Thread Excel-Datei öffnen - editieren - speichern (4 answers)
Opened by MartinR at 2008-02-08 09:33

havi
 2008-02-08 12:46
#105707 #105707
User since
2003-08-04
2036 Artikel
BenutzerIn
[Homepage]
user image
Nein, brauchst kein Excel spezifisches Modul dafuer, funkt auch so...

Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/perl

use warnings;
use strict;
use Win32::OLE;

my $xlsFile = "c:\\lokale_daten\\test.xls";

my $excel = Win32::OLE->new('Excel.Application','Quit') or die $!;
my $workbook = $excel->Workbooks->Open($xlsFile);
my $sheet = $workbook->Worksheets(1);

$sheet->Range("A1")->{Value} = "B";

$excel->Save();

$excel->Quit();

print "Fertig.\n";

1;

View full thread Excel-Datei öffnen - editieren - speichern