Formula missing in excel after using perl


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Formula missing in excel after using perl
# 1  
Old 03-13-2013
Formula missing in excel after using perl

Hi all,

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

- read a existing excel file with :

Code:
$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 Smilie. 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 ?

Last edited by Corona688; 03-13-2013 at 12:46 PM..
# 2  
Old 03-13-2013
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.
# 3  
Old 03-14-2013
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 ...
# 4  
Old 03-14-2013
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: http://stackoverflow.com/questions/7...a-computing-it

Last edited by DGPickett; 03-15-2013 at 01:10 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl script to Merge contents of 2 different excel files in a single excel file

All, I have an excel sheet Excel1.xls that has some entries. I have one more excel sheet Excel2.xls that has entries only in those cells which are blank in Excel1.xls These may be in different workbooks. They are totally independent made by 2 different users. I have placed them in a... (1 Reply)
Discussion started by: Anamika08
1 Replies

2. Shell Programming and Scripting

Perl CGI : unable to download the excel sheet from perl cgi page

Hi All, I have written an cgi perl script that displays an image(Excel image) and when clicked on that Image I need to download a excel sheet. I made sure that excel sheet exists in the folder with the given name but still I am not able to download the sheet. print "<center><table... (2 Replies)
Discussion started by: scriptscript
2 Replies

3. Shell Programming and Scripting

Writing excel file using perl : Excel file formatting changed

I am trying to create a program where user can input data in certain excel cells using user interface on internet....the programming is on perl and server is unix But when i parse data into excel the formatting of sheets is turned to default and all macro coding removed. What to do...Please... (7 Replies)
Discussion started by: mud_born
7 Replies

4. Shell Programming and Scripting

formula missing in excel after using perl

Dear all, I got a template excel file which contains several worksheets. Each worksheet contains some formulas in the cells. I am using the perl script to read a CSV file and then put the data of CSV into template excel file(first worksheet) and then save it as new file name using ... (0 Replies)
Discussion started by: eldonlck
0 Replies

5. Shell Programming and Scripting

Excel sheet modification using perl module

Is there any possibility to move the content from one cell to another cell (Excel sheet) using perl module? (3 Replies)
Discussion started by: kavi.mogu
3 Replies

6. Shell Programming and Scripting

creating excel file using perl

Hi , I am writing a simple excel file and want to create the file under say 'D:\Documents and Settings'. The problem with my code is it is writing in the same directory instead of the specified. Here is a sample code use Spreadsheet::WriteExcel; my $workbook =... (1 Reply)
Discussion started by: daptal
1 Replies

7. Shell Programming and Scripting

modify Existing MS excel workbook in perl

Hi I need to modify an excel file in perl and for which I installed perl in Linux 1. Open a existing excel file 2. delete an unwanted Sheet called "summary" 3. and i want to insert some data into range of cells ( B1:B11) 4. Remove unwanted value called "Sum" repeated in the... (1 Reply)
Discussion started by: luke_devon
1 Replies

8. Shell Programming and Scripting

Perl with Excel Graph

Hi Everyone, Would like to know some hints where should I look for, if I want to do the perl with excel graph staff, i read some people say can use GD:Graph, would please give me some guide on where should I search for, which keyword should I put into google to search. Thanks (1 Reply)
Discussion started by: jimmy_y
1 Replies

9. Shell Programming and Scripting

PERL: Split Excel Workbook to Indiv Excel files

Hi, I am trying to find a way to read an excel work book with multiple worksheets. And write each worksheet into a new excel file using perl. My environment is Unix. For example: I have an excel workbook TEST.xls and it has Sheet1, Sheet2, Sheet3 worksheets. I would like to create... (2 Replies)
Discussion started by: sandeep78
2 Replies

10. Shell Programming and Scripting

PERL - [B]Cloning[/B] an Excel file

Hi I plan to read an excel file (using Spreadsheet::ParseExcel) and create a clone of it with some other name (using Spreadsheet::WriteExcel). I am able to get the skeleton by reading cells in every pair of every worksheet. But I am not able to get the format string of these cells. I want the... (5 Replies)
Discussion started by: srinivay
5 Replies
Login or Register to Ask a Question