# Excel öffnen use Win32::OLE; $Win32::OLE::Warn = 3; my $excel = Win32::OLE->new('Excel.Application') || die "Kann Excel nicht starten"; $excel->{Visible} = 1; # Mappe öffnen my $book = $excel->Workbooks->Open("datei.xls"); $excel->Application->{ActivePrinter} = 'hp deskjet 5550 series auf Ne00:'; $book->Sheets("Tabelle1")->PrintOut; # HTML-Ausgabe print ("Content-type: text/html\n\n"); print qq~ Seite wird gedruckt... Seite wird gedruckt... ~; # Excel beenden $book->Save(); $book->Close();