Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^3: Append new line in excel sheets

by Laurent_R (Canon)
on Jul 11, 2014 at 22:00 UTC ( [id://1093318]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Append new line in excel sheets
in thread Append new line in excel sheets

since it reads the file inmemory so its memory usage hits upto 1GB for only 11MB file .
And so what? Does the program fail? 1 GB in memory is quite large, but is not necessarily a problem with current computers. (Although I am quite a bit surprised that it should take that much.)

The next question is which version of Excel produced your files. Although I haven't used Perl to work on Excel files for at least 6 years (except one relatively small project writing fairly simple Excel files under Unix), my understanding is that the most recent Excel file format is really a zipped file containing a number of XML file components. If this is the case with your version, then updating the right file component might be sufficient. I have never done it, and have no idea whether it is simple or not, whether it works or not, but it might be a useful clue.

Another alternative might be to export your Excel file in CSV format, to update the CSV file, and to convert it back to Excel.

I dunno if this is gonna get you anywhere, but these are just two possible solutions.

Replies are listed 'Best First'.
Re^4: Append new line in excel sheets
by CountZero (Bishop) on Jul 12, 2014 at 12:34 UTC
    The OP is given .XLS files which are binary files and can only be opened with the Spreadsheet::ParseExcel module and that fileformat can only be read in memory as a whole

    The OP does not have Excel on his machine so he cannot transform the .XLS files in csv-files either.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

    My blog: Imperial Deltronics

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1093318]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2024-03-28 10:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found