If starting Excel on _another_ Win32 box is an option, you can try the following stunt.
use Win32::OLE;
my $excel = Win32::OLE->new(['172.16.12.100','Excel.Application'])
or die "Can't start excel: $!";
my $workbook = $excel->Workbooks->Open('c:\test.xls')
or die "Can't open file: ",Win32::OLE->LastError();
my $sheet = $workbook->Worksheets(1)
or die "Can't open sheet: ",Win32::OLE->LastError();
my $everything=$sheet->UsedRange()->{Value}
or die "Can't get range: ",Win32::OLE->LastError();
for (@$everything) {
for (@$_) {
print defined($_) ? "$_|" : "<undef>|";
}
print "\n";
}
$excel->Quit;
This code will start Excel on 172.16.12.100 (a box with MS Office installed) using DCOM and open the file c:\test.xls (c:\test.xls on 172.16.12.100 !!!) and print a delimited output of the first worksheet.
Can't think of a thinner way to do it ;-)
/brother t0mas