The Error Message is:use strict; # Create Chart use Win32::OLE; use Win32::OLE::Const 'Microsoft Excel'; my $Excel = Win32::OLE->new("Excel.Application"); $Excel->{Visible} = 1; #my $Book = $Excel->Workbooks->Add; my $Workbook = "Auswertung022004.xls"; my $activeWorkbook = $Excel->Workbooks->Open($Workbook); my $Sheet = $activeWorkbook->Worksheets("INF2");
Can't call method "Worksheets" on an undefined value at H:\work\Auswer +tungen\ExcelChartWrite.pl line 14.
I would try to activate a Worksheet, even if I replace "INF2" with 1 (which should be the first sheet) the same Error Message shows up, what did I wrong?
Even if I put the line out, the Excel File Closes imediatly, Because of that it would be much easier to simply put the macro into the Excel file, because the macro has been debuged and runns propperly
In reply to Re: Re: Question about Win32::OLE and Excel
by Streen
in thread Question about Win32::OLE and Excel
by Streen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |