Leser: 26
1
2
Win32::OLE(0.1709) error 0x80020005: "Typkonflikt"
in METHOD/PROPERTYGET "" argument 1 at ccmuser2xls.pl line 1107
$Sheet->Range("B22:E22")->Pictures->Insert("C:\\mydoku\\images\\logo.tif");
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#!/usr/bin/perl use warnings; use strict; use Win32::OLE::Const 'Microsoft Excel'; $Win32::OLE::Warn = 3; my $excel = Win32::OLE->GetActiveObject('Excel.Application') || Win32::OLE->new('Excel.Application', 'Quit'); my $book = $excel->Workbooks->Open("C:\\dev\\test.xls"); $book->ActiveSheet->Pictures->Insert("C:\\dev\\Logo.png"); $book->Close; $excel->Quit();
2009-09-29T13:15:59 haviCode (perl): (dl )1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17#!/usr/bin/perl use warnings; use strict; use Win32::OLE::Const 'Microsoft Excel'; $Win32::OLE::Warn = 3; my $excel = Win32::OLE->GetActiveObject('Excel.Application') || Win32::OLE->new('Excel.Application', 'Quit'); my $book = $excel->Workbooks->Open("C:\\dev\\test.xls"); $book->ActiveSheet->Pictures->Insert("C:\\dev\\Logo.png"); $book->Close; $excel->Quit();