in reply to Re: Question about Win32::OLE and Excel
in thread Question about Win32::OLE and Excel
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Question about Win32::OLE and Excel
by Grygonos (Chaplain) on Apr 20, 2004 at 17:43 UTC | |
by bmann (Priest) on Apr 20, 2004 at 18:30 UTC |