Thread ole32 -> Excel-chart bild einfügen
(6 answers)
Opened by NixIsFix at 2009-05-11 16:55
so nochmal der ganze code des "mini" files
(code von "Gast") Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 use strict; use Getopt::Long; use File::Basename; use Spreadsheet::WriteExcel; use Win32::OLE qw(in with); use Win32::OLE::Const 'Microsoft Excel'; $Win32::OLE::Warn = 3; # die on errors... my $excel = Win32::OLE->GetActiveObject('Excel.Application')|| Win32::OLE->new( 'Excel.Application', 'Quit' ); my $workbook = $excel -> Workbooks -> Add(); my $sheet = $workbook -> Worksheets( 1 ); my $range = $sheet -> Range( 'A1:G2' ); $range -> {Value} = [ [ qw( 14 24 4 35 26 45 34 ) ], [ qw( 34 25 23 24 34 32 11 ) ] ]; my $chart = $workbook -> Charts -> Add(); $chart -> SetSourceData( { Source => $range, PlotBy => xlRows } ); $chart -> Activate; my $range2 = $chart -> Pictures -> Insert( 'Testbild.jpg' ); $range2 -> ShapeRange -> IncrementLeft( 60 ); $range2 -> ShapeRange -> IncrementTop( 60 ); und es bleibt immer noch dieselbe fehlermeldung -> Code: (dl
)
1 OLE exception from "Microsoft Office Excel": nun ne idee? |