After fixing your bugs this works for me
use Win32::OLE qw(in with); use Win32::OLE::Const 'Microsoft Excel'; $Win32::OLE::Warn = 3; #my $Excel=Win32::OLE->GetActiveObject('Excel.Application') my $Excel = Win32::OLE->GetActiveObject('Excel.Application') || Win32::OLE->new('Excel.Application', 'Quit'); #$excelfile= "C:/perlpractice/simple.xlsm"; $excelfile= "C:/perlpractice/testfile.xlsm"; $Book=$Excel->Workbooks->Open($excelfile); $Sheet=$Book->Worksheets(1);
In reply to Re^9: Reading Excel
by huck
in thread Reading Excel
by ravi179
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |