Formula missing in excel after using perl

Hi all,

I use "Spreadsheet::ParseExcel::SaveParser" to

  • read a existing excel file with :
$Parser = Spreadsheet::ParseExcel::SaveParser->new();
$HeaderFile =  $Parser->Parse("XLS_FILE_ACCESS");

- modify some values in somes cell with : 

$worksheet->AddCell($row_target,$col_max, $component_version, $cell->{FormatNo});

  • save the existing file with :

$HeaderXLSFile->SaveAs

All is right, but when i open the xls modified file, all formula is missing :(. I read somewhere that's the problem of "SaveParser", but i didn't find the solution to resolve this problem.

Please, who know a solution for this problem ?

Yom

---------- Post updated at 07:33 AM ---------- Previous update was at 06:22 AM ----------

no body can help me ?

I am not a Perl user, but this is what I found in CPAN:

You can only rewrite the features that Spreadsheet::WriteExcel supports so macros, graphs and some other features in the original Excel file will be lost. Also, formulas aren't rewritten, only the result of a formula is written.

Only last print area will remain. (Others will be removed)

So you probably have to look for alternatives.

Thks for your answer

---------- Post updated at 02:47 PM ---------- Previous update was at 02:44 PM ----------

in fact i think that i must used "Win32::OLE" to modify a existing xls file to preserve formula, but Excel must be installed in the computer that excute the script ...

Libre Office can execute Excel scripts ? Is there an excel compatible curses app like vi and lynx that could be character-driven? Oleo?

PERL monks say PERL can read formula or value: http://www.perlmonks.org/?node_id=864068

JAVA can do it with apache poi: Java POI : How to read Excel cell value and not the formula computing it? - Stack Overflow