merrymonk has asked for the wisdom of the Perl Monks concerning the following question:
Frequently the problem has been to find out the ‘name’ of the variable to set – for example ActivePrinter.$excel->{ActivePrinter} = "Auto HP Deskjet 6500 Series on HOMEDELLTOWE +R on Ne02:";
This failed and I got a ‘windows’ error message saying that “perl.exe has encountered a problem and needs to close. We are sorry for the inconvenience."use strict ; use OLE; use Win32::OLE::Const "Microsoft Excel"; my ($excel, $workbook, $sheet, $jex); $excel = CreateObject OLE "Excel.Application"; $workbook = $excel -> Workbooks -> Add; print "before jex loop\n"; foreach $jex (sort {$a cmp $b} %$excel) { print "$jex <$excel->{$jex}\n"; } print "after jex loop\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Finding out Excel 'variables'
by Corion (Patriarch) on Jan 15, 2011 at 16:18 UTC | |
|
Re: Finding out Excel 'variables'
by Gangabass (Vicar) on Jan 16, 2011 at 06:42 UTC | |
|
Re: Finding out Excel 'variables'
by davies (Monsignor) on Jan 17, 2011 at 12:24 UTC | |
|
Re: Finding out Excel 'variables'
by planetscape (Chancellor) on Jan 18, 2011 at 11:49 UTC | |
by davies (Monsignor) on Jan 18, 2011 at 15:51 UTC |