abhishes has asked for the wisdom of the Perl Monks concerning the following question:
Win32::OLE(0.1502) error 0x80020009: "Exception occurred" in PROPERTYPUT "ColumnWidth" at ole.pl line 10 quitting Microsoft Excel
use strict; use warnings; use Win32::OLE; my $excel = new Win32::OLE("Excel.Application", \&EndApp); $excel->{Visible} = 1; my $workbook = Win32::OLE->GetObject("c:\\test.xls"); my $worksheet = $workbook->Worksheets(1); my $column = $worksheet->Range("A1"); $column->{ColumnWidth} = 400; sub EndApp { my $comobject = $_[0]; print "quitting ". $comobject->{Name}."\n"; $comobject->Quit(); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to resize a column in excel with Win32::OLE
by jmcnamara (Monsignor) on Feb 06, 2003 at 13:40 UTC | |
by abhishes (Friar) on Feb 06, 2003 at 13:52 UTC | |
by jmcnamara (Monsignor) on Feb 06, 2003 at 14:11 UTC |