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

This is a "catch 22" situation: using a plain Spreadsheet::ParseExcel (as shown in my example) is not possible because of memory constraints and using Spreadsheet::ParseExcel with a cell handler fails on some spreadsheets.

To make these spreadsheets work, you have to add an extra line at the end, but you can only do that by using Spreadsheet::ParseExcel which won't work (see above).

I'm afraid you are stuck. :(

The only solution I see is to contact the author of Spreadsheet::ParseExcel and inform him of the "bug" in the cellhandler routine which fails to find all cells and see if he has a solution.

That, or use a machine which is less loaded or has more memory.

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

Replies are listed 'Best First'.
Re^8: Append new line in excel sheets
by perl_new_b (Novice) on Jul 21, 2014 at 11:41 UTC

    Hi CountZero thanks a lot for this very useful suggestion :) I surly will report this as a bug on their forum.

      If I installed Excel Viewer, then would it be possible to use WIn32::OLE?? Currently, I'm using :

      my $Excel = Win32::OLE->new('Excel.Application') or die "oops\n";

      But for the above case of Excel.Application it dies, can I use some other call for that instead of Excel.Application???

        Honestly, I have no idea. You will have to check the documentation, but as it is "only" a viewer I really doubt it can even export, let alone change, the data in Excel.

        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