#!"C:\xampp\perl\bin\perl.exe" -w use CGI::Carp qw(fatalsToBrowser warningsToBrowser); use strict; use Win32::OLE qw(in with); use Win32::OLE::Const 'Microsoft Excel'; $Win32::OLE::Warn = 3; # die on errors... print "Content-type: text/html\n\n"; my $Excel = Win32::OLE->GetActiveObject('Excel.Application') || Win32::OLE->new('Excel.Application', 'Quit'); $Excel->{Visible} = 1; # ?? my $Book = $Excel->Workbooks->Open("datei1.xls"); # open Excel file my $Sheet = $Book->Worksheets(1); # select worksheet number 1 (you can also select a worksheet by name) foreach my $row (1..10){ foreach my $col (1..4) { my $Val = $Sheet->Cells($row,$col)->{'Value'}; # shows value my $Dis = $Sheet->Cells($row,$col)->{'Text'}; # shows formated value my $Form = $Sheet->Cells($row,$col)->{'Formula'}; # shows formula print "$row, $col, $Dis, $Val, $Form
\n"; } print "
\n"; } # hier soll irgendwas modifiziert werden $Book->Close; print "ready
\n";