[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Excel Parsing : extract values of cells with formulae

Geeta Sachdeva

10/15/2007 1:05:00 PM

Hi,

I'v read a lot of posts regarding excel parsing, however, none of it
helped me.
I'm trying to use 'parseexcel' to parse my worksheets. Uptill now, using
this, I have not been able to extract values of cells which are
evaluated using formulae. Also, the excel files that I need to parse
contain references to other excel files or different sheets in same
file.
Is there any other way to parse which would solve my purpose?

Thanks,
Geeta
--
Posted via http://www.ruby-....

4 Answers

Bernard Kenik

10/15/2007 4:22:00 PM

0

On Oct 15, 9:04 am, Geeta Sachdeva <manchanda.ge...@gmail.com> wrote:
> Hi,
>
> I'v read a lot of posts regarding excel parsing, however, none of it
> helped me.
> I'm trying to use 'parseexcel' to parse my worksheets. Uptill now, using
> this, I have not been able to extract values of cells which are
> evaluated using formulae. Also, the excel files that I need to parse
> contain references to other excel files or different sheets in same
> file.
> Is there any other way to parse which would solve my purpose?
>
> Thanks,
> Geeta
> --
> Posted viahttp://www.ruby-....

If you are on Windows then I suggest that you use win32ole to
manipulate Excel workbooks and worksheets.
I am fairly proficient in using Ruby and WIN32OLE and if you need some
assistance you can contact me offline.

You might want to look at the 'roo' gem if you only want to extract
values from an Microsoft Excel sheet or Open Office Calc document.

Geeta Sachdeva

10/16/2007 5:18:00 AM

0

Bernard Kenik wrote:
> On Oct 15, 9:04 am, Geeta Sachdeva <manchanda.ge...@gmail.com> wrote:
>>
>> Thanks,
>> Geeta
>> --
>> Posted viahttp://www.ruby-....
>
> If you are on Windows then I suggest that you use win32ole to
> manipulate Excel workbooks and worksheets.
> I am fairly proficient in using Ruby and WIN32OLE and if you need some
> assistance you can contact me offline.
>
> You might want to look at the 'roo' gem if you only want to extract
> values from an Microsoft Excel sheet or Open Office Calc document.

Hi Bernard,

Thanks for the response.
OS ill be using this parser on is Mac and not Windows.

Does 'roo' gem also evaluate formulas? Because as I mentioned earlier, I
also need values of cells which have formulae, aslo some of the cells In
the excel refer to different excel files or different sheets in same
file.

Thanks,
Geeta
--
Posted via http://www.ruby-....

mortee

10/16/2007 3:31:00 PM

0

Bernard Kenik

10/16/2007 9:22:00 PM

0

On Oct 16, 11:30 am, mortee <mortee.li...@kavemalna.hu> wrote:
> Geeta Sachdeva wrote:
> > Does 'roo' gem also evaluate formulas? Because as I mentioned earlier, I
> > also need values of cells which have formulae, aslo some of the cells In
> > the excel refer to different excel files or different sheets in same
> > file.
>
> Roo's home page describes what it can do and what not.
>
> Basically, it states that for cells with formulae in OpenOffice files,
> it can return whatever value is saved in the document, without
> reevaluating anything. It also says that it doesn't handle formulas in
> Excel docs, without explaining whether it means that it can't
> recalculate the values just like with OOo, or it is unable to return any
> value at all.
>
> mortee

>From reading the rdoc for the roo gem
cell(excel)

cell(col,row)
returns the content of a cell. The upper left corner is (1,1) or ('A',
1)

I interpret this to mean that it will return the result of the
formula. This needs to be verified by you.

good luck.

It may be that microsoft office on the Mac does use COM objects. If
so, you should be able to use win32ole.
If you only want to read values from a sheet then win32ole would be an
overkill.