用 Perl 读写 Excel 文件
安装 Excel 模块的 PPM 命令 ppm> install OLE::Storage_Lite ppm> install Spreadsheet::ParseExcel ppm> install Spreadsheet::WriteExcel Windows 示例:解析 读写已有Excel #!/usr/bin/perl -w use strict; use Win32::OLE qw(in with); use Win32::OLE::Const 'Microsoft Excel'; $Win32::OLE::Warn = 3; # die on errors... # get already active Excel application or open new my $Excel = Win32::OLE->GetActiveObject('Excel.Application') || Win32::OLE->new('Excel.Application', 'Quit'); # open Excel file my $Book = $Excel->Workbooks->Open("c:/komodo projects/test.xls"); # You can dynamically obtain the number of worksheets, rows,