in reply to Write to Excel

Hi prafulltc,
I'm working with the assumption you mean https://metacpan.org/module/Spreadsheet::ParseExcel.

Anyway, that module allows for reading of Excel data. To write data you would need to use another module such as https://metacpan.org/module/Spreadsheet::WriteExcel. In my experience I have not found a module that allows you to open a workbook, add or modify data, and write out to the same file.

When I've had to solve similar problems I've always read the data from one workbook with S::PE, then created an S::WE object to write out to a new file.

I couldn't find an AddCell method in Spreadsheet::ParseExcel as zeni suggested. I do see that method in Spreadsheet::WriteExcel.

Replies are listed 'Best First'.
Re^2: Write to Excel
by dasgar (Priest) on May 30, 2012 at 15:19 UTC
    In my experience I have not found a module that allows you to open a workbook, add or modify data, and write out to the same file.

    If you're on a Windows system that has Excel installed, the Win32::OLE module will allow you to control Excel, which in turn means that you can open an Excel file, make modifications and save the modifications.

    However, to do those tasks without directly using Excel, I would agree with you about not being aware of a single module to allow for read and write functionality.

      Excellent point, thanks! These days I'm working mostly in Linux or OS X; I had completely forgotten about Win32::OLE.