Mailing List Archive

OLE AUtomation
(I hope that I did not miss this in a recent message)

I tried the new OLE utomation, by cutting the example from the oleauto.htm
doc

use OLE;
$excel = CreateObject OLE 'Excel.Application.5'
or warn "Couldn't create new instance of Excel App!!";
$excel->Workbooks->Open( 'test.xls' );
$excel->Workbooks(1)->Worksheets('Sheet1')->Cells(1,2)->{Value} = 'foo';
$excel->Workbooks(1)->Worksheets('Sheet1')->Cells(1,2)->{Value} = 'bar';
$excel->Save();
$excel->Quit();

Running it (perl test.pl) gives:

Can't call method "Open" without a package or object reference at test_ole.pl line 4.

P.S. The win32.htm doc says to use perl_for_win32, but both that bounces.
--
Don Reid

Home: Office:
e-mail don@reid.corvallis.or.us donr@cv.hp.com
phone 541-754-0707 541-715-2726

address 3325 NW McKinley Dr. 1000 NE Circle Blvd.
Corvallis, OR 97330 Corvallis, OR 97330
USA USA