in reply to Problem opening WriteExcel generated spreadsheets with OLE
I get the same error on a spreadsheet I created myself with Excel 2003. Using the slightly modified codeuse strict; use warnings; use 5.010; #use Spreadsheet::WriteExcel; use Win32::OLE qw(in with); use Win32::OLE::Const 'Microsoft Excel'; $Win32::OLE::Warn=3; my $Excel=Win32::OLE->GetActiveObject('Excel.Application')|| Win32::OLE->new('Excel.Application', 'Quit'); my $book=$Excel->Workbooks->Open("./test.xls"); my $sheet=$book->Worksheets(1);
it opens the workbook just fine.use strict; use warnings; use 5.010; #use Spreadsheet::WriteExcel; use Win32::OLE qw(in with); use Win32::OLE::Const 'Microsoft Excel'; $Win32::OLE::Warn=3; my $Excel=Win32::OLE->GetActiveObject('Excel.Application')|| Win32::OLE->new('Excel.Application', 'Quit'); my $book=$Excel->Workbooks->Open("c:\\data\\temp\\test.xls"); my $sheet=$book->Worksheets(1);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Problem opening WriteExcel generated spreadsheets with OLE
by vassago (Novice) on Mar 03, 2010 at 21:50 UTC | |
by furry_marmot (Pilgrim) on Mar 04, 2010 at 17:31 UTC |