-
StackOverflow 文件
-
Perl Language 教程
-
帶有 Win32 OLE 模組的 Windows Excel 的 Perl 命令
-
2.操作工作表
#Get the active Worksheet
my $Book = $Excel->Activewindow;
my $Sheet = $Book->Activesheet;
#List of Worksheet names
my @list_Sheet = map { $_->{'Name'} } (in $Book->{Worksheets});
#Access a given Worksheet
my $Sheet = $Book->Worksheets($list_Sheet[0]);
#Add new Worksheet
$Book->Worksheets->Add({After => $workbook->Worksheets($workbook->Worksheets->{Count})});
#Change Worksheet Name
$Sheet->{Name} = "Name of Worksheet";
#Freeze Pane
$Excel -> ActiveWindow -> {FreezePanes} = "True";
#Delete Sheet
$Sheet -> Delete;