Mr. Muskrat has asked for the wisdom of the Perl Monks concerning the following question:
My Fellow Monks,
I am trying to read an Excel file and insert it into a worksheet in another Excel file. I can read the data and the formats and insert them correctly. I am using Spreadsheet::ParseExcel to get the data and format. I am using Spreadsheet::WriteExcel to insert it into a new Excel file (along with data from several other sources).
Can someone please enlighten me as to how to get the numeric format of a cell with Spreadsheet::ParseExcel?
I can see what type of cell it is by using:
(Which is 'Text', 'Numeric' or 'Date' BTW)my $cell = $worksheet->{Cells}[$row][$col]; my $cell_type = $cell->{Type};
I can get the value before or after it is formatted with:
I can retrieve the cell format information (which has nothing to do with the numeric format) by using:my $val = $cell->{Val}; my $value = $cell->{Value};
Am I missing something important? Obviously I am or I would not have to ask...
If all else fails I can always just use the already formatted value...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Spreadsheet::ParseExcel Numeric Format Woes
by jmcnamara (Monsignor) on Aug 14, 2002 at 22:34 UTC | |
by Mr. Muskrat (Canon) on Aug 14, 2002 at 23:28 UTC | |
by Anonymous Monk on Jun 03, 2010 at 05:25 UTC | |
by jdporter (Paladin) on Jun 03, 2010 at 18:16 UTC |