#!/usr/bin/perl
use Win32::OLE;
$xlApp = Win32::OLE->new('Excel.Application');
$xlApp->{Visible} = 1;
# Create a new workbook
$xlBook = $xlApp->Workbooks->Add;
$col = $row = 1;
$xlBook->write($row, $col, 'aa');
$xlBook->write(1, $col, 'bb');
$xlBook->write('A3', 123);
exit;
# Wait for user input...
print "Press <return> to continue...";
$x = <STDIN>;
# Clean up
$xlBook->{Saved} = 1;
$xlApp->Quit;
$xlBook = 0;
$xlApp = 0;
print "All done.";
程式碼如上,不知道為何只能開啟Excel後,卻沒有在相對應位置輸入字
是語法有錯還是少安裝了什麼嗎??