sujitsj has asked for the wisdom of the Perl Monks concerning the following question:

Hello,

I am using Spreadsheet::ParseExcel::SaveParser module to append two xls files. After appending the two xls the data type of all cells is of text type. Even numeric values get converted to "text" type. Because of this all formulae's like summation get lost in the output xls.

The function which is used to write the cells of the output xls is:

 $oBook->AddCell($dest_sheet_number, $row  , $obook_col, $storage_book->{$sheet}->{$row}->{$col},$iFmt);

iFmt is derived from the worksheet which is being appended using following:

my $iFmt = $oBook->{Worksheet}[0]->{Cells}[$maxdelay_start - 1][2]- +>{FormatNo};

Is there a way to convert the data type of cell from "text" to "numeric" ?

Regards,
Sujit

20090811 Janitored by Corion: Added formatting, code tags

Replies are listed 'Best First'.
Re: Doubt about using SaveParser: Data type of Cells
by ww (Archbishop) on Aug 09, 2009 at 21:02 UTC