#!"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; 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("C:/xampp/cgi-bin/neoplast/rw_excel/datei1.xls"); my $Sheet = $Book->Worksheets(1); 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"; } $Sheet->Cells(3,5)->{'Value'} = "1"; my $value = $Sheet->Cells(3,5)->{'Value'}; $Book->Close; print "ready
\n";