Excel Parsing : extract values of cells with formulae

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

On Oct 15, 9:04 am, Geeta S. [email protected] wrote:

Thanks,
Geeta

Posted viahttp://www.ruby-forum.com/.

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.

Bernard K. wrote:

On Oct 15, 9:04 am, Geeta S. [email protected] wrote:

Thanks,
Geeta

Posted viahttp://www.ruby-forum.com/.

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

On Oct 16, 11:30 am, mortee [email protected] wrote:

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.

Thanks Everyone

Iv just read the homepage of roo n it really looks helpful
I hope it works for me :slight_smile:

Geeta S. 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