#!/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后,却没有在相对应位置输入字
是语法有错还是少安装了什么吗??