in reply to Re: Cannot seem to pass number to a function
in thread Cannot seem to pass number to a function
#!c:\perl\bin\ -w use Win32::OLE qw(in with); use Win32::OLE::Const 'Microsoft Excel'; use Win32::OLE::Variant; use Win32::OLE::NLS qw(:LOCALE :DATE); use strict; my $configfile = "OleoresinSpreadsheet2.conf"; open (CONFIG,$configfile); my $HPLC_Collum; if(<CONFIG>=~/;;HPLCColumn;;([0-9]+);/){ $HPLC_Collum= $1; } my $Excel = Win32::OLE->GetActiveObject('Excel.Application') || Win32::OLE->new('Excel.Application', 'Quit'); my $excelfile = 'F:\Spreadsheet\lab results\COPY GRID MASTER COPY.xls' +; my $Book = $Excel->Workbooks->Open($excelfile); my $WorkBooknumber = 6; my $Sheet = $Book->Worksheets($WorkBooknumber); print($HPLC_Collum); print($Sheet->Cells(6,$HPLC_Collum)->{'Value'});
Win32::OLE(0.1709) error 0x800a03ec in METHOD/PROPERTYGET "Cells" at C:\Documents and Settings\KHusban +d\Desktop\ New Folder\test2.pl line 20 Can't use an undefined value as a HASH reference at C:\Documents and S +ettings\KH usband\Desktop\New Folder\test2.pl line 20, <CONFIG> line 1. 18
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Cannot seem to pass number to a function
by ack (Deacon) on Aug 12, 2009 at 16:37 UTC | |
by BlueInk (Novice) on Aug 12, 2009 at 17:04 UTC | |
|
Re^3: Cannot seem to pass number to a function
by ig (Vicar) on Aug 12, 2009 at 19:40 UTC | |
by BlueInk (Novice) on Aug 13, 2009 at 13:01 UTC | |
by Anonymous Monk on Nov 23, 2010 at 14:25 UTC | |
by ig (Vicar) on Nov 26, 2010 at 22:10 UTC | |
by Anonymous Monk on Dec 03, 2013 at 20:18 UTC | |
by Anonymous Monk on Mar 09, 2011 at 22:22 UTC |