Thread excel tabelle: leere felder in der excel tab. ermitteln (3 answers)
Opened by Gast at 2004-08-31 18:32

renee
 2004-08-31 22:10
#49724 #49724
User since
2003-08-04
14371 Artikel
ModeratorIn
[Homepage] [default_avatar]
Mit Win32::OLE geht das relativ einfach!
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
        use Win32::OLE;

# use existing instance if Excel is already running
my $excel = Win32::OLE->GetActiveObject('Excel.Application') || Win32::OLE->new('Excel.Application', 'Quit');
my $workbook = $excel->Workbooks->Open("c:\\your_file.xls");
my $worksheet = $workbook->Worksheets(1);
for my $row(0..$maxRow) {
for my $col(0..$maxCol) {
my $cell = $workbook->{Cells}[$row][$col];
$cell->{Value} = '#Failure' unless($cell->{Value});
}
}
# save and exit
$workbook->Close();
ungetestet!
OTRS-Erweiterungen (http://feature-addons.de/)
Frankfurt Perlmongers (http://frankfurt.pm/)
--

Unterlagen OTRS-Workshop 2012: http://otrs.perl-services.de/workshop.html
Perl-Entwicklung: http://perl-services.de/

View full thread excel tabelle: leere felder in der excel tab. ermitteln