1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/perl
use warnings;
use strict;
use Win32::OLE;
my $filename = 'test.xls';
$filename = Win32::GetFullPathName( $filename );
my $excel = Win32::OLE->GetActiveObject('Excel.Application') || Win32::OLE->new('Excel.Application', 'Quit');
my $workbook = $excel->Workbooks->Open($filename);
my $sheet = $workbook->worksheets(1) || die("$@$!");
$sheet->Range("A1")->{Value} = "B";
$excel->Save();
$excel->Quit();
print "Fertig.\n";
1;
my $excel = Win32::OLE->GetActiveObject('Excel.Application') or die Win32::OLE->LastError();
2011-09-28T14:25:10 GwenDragonVielleich schlägt ja der Aufruf in Zeile 9 schon fehl.
Versuche mal in Zeile 9 folgendes:
Code: (dl )my $excel = Win32::OLE->GetActiveObject('Excel.Application') or die Win32::OLE->LastError();
my $filename = 'C:\Users\Tester\Desktop\test.xls';