in reply to open workbook-WriteExcel

To quote from the documentation:
This module cannot be used to write to an existing Excel file.
Sorry. There is a ParseExcel module which can in principle be used, but not easily, and anything in the spreadsheet that is not supported by both modules would be lost when you copy it to a new workbook.

Replies are listed 'Best First'.
Re: Re: open workbook-WriteExcel
by Grygonos (Chaplain) on Nov 18, 2003 at 22:09 UTC

    you can use Win32::OLE to create that object. Below is a tested and verified example of how to add a sheet. If you want it to be named something specific you must later change the name property, as the worksheet cannot be named when it is first created.

    #!/perl -w use strict; use Win32::OLE; my $path = "C:\\TEST_EXCEL"; my $excel = new Win32::OLE('Excel.Application'); my $workbook = $excel->Workbooks->Open($path."\\Book1.xls"); $workbook->Worksheets->Add(); $workbook->Save(); $excel->Quit();

    Grygonos