in reply to Re^3: Open a file in append mode
in thread Open a file in append mode

Spreadsheet::ParseExcel::SaveParser working amazingly. Somebody suggested Win32::OLE. Which is more effective and which one is simpler???

Before you said that dont mingle modules. In this  Spreadsheet::ParseExcel::SaveParser i cant find max_rows & max_col which is available in other modules. As per my requirement I need to insert a row which consists of 11 columns in the end of the sheet. In this Saveparser how to find last row

Replies are listed 'Best First'.
Re^5: Open a file in append mode
by afoken (Chancellor) on Aug 12, 2015 at 19:08 UTC
    Spreadsheet::ParseExcel::SaveParser working amazingly. Somebody suggested Win32::OLE. Which is more effective and which one is simpler???

    Win32::OLE requires that your perl code runs on a Windows system, and that system must have Excel installed. (It should be possible to use Wine and Excel, but I would not bet on that.) Excel knows every detail of its files, so it can rewrite its files without problems.

    Spreadsheet::ParseExcel::SaveParser should work on any system. It knows how an Excel file is organised and does not need Excel. Unfortunately, not all Excel features are supported, so rewriting an Excel file using Spreadsheet::ParseExcel::SaveParser is currently lossy. See "Known Problems" in the documentation.

    Which one is simpler? Spreadsheet::ParseExcel::SaveParser does not need Windows, Excel, and the sometimes fragile interaction with Excel. The Win32::OLE way requires that you know how to use OLE on Windows, e.g. from Visual Basic. If you don't know anything about OLE, you will have to learn OLE and Win32::OLE.

    Which one is more effective? Define "effective". Lines of Code required? I have no idea. Speed? Just measure. Use both variants to solve the same problem, then run both variants and see for yourself which one takes longer.

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
Re^5: Open a file in append mode
by Corion (Patriarch) on Aug 12, 2015 at 06:44 UTC