Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Exporting VBA code from Excel: Win32::OLE exceptions & orphaned processesby shockers_jm (Initiate) |
on Apr 01, 2015 at 22:36 UTC ( [id://1122211]=perlquestion: print w/replies, xml ) | Need Help?? |
shockers_jm has asked for the wisdom of the Perl Monks concerning the following question:
I've worked on a program to export VBA code from Excel spreadsheets to STDOUT. It's worked well for many years, but I needed to start running it on more PCs. ISSUE 1: I've encountered runtime errors on about a quarter of the 18 PCs I tried running it on: OLE exception from "Microsoft Excel": Programmatic access to Visual Basic Project is not trusted Win32::OLE(0.1712) error 0x80020009: "Exception occurred" in METHOD/PROPERTYGET "VBProject" at Vba2Asc_simple.pl line 24. OLE exception from "Microsoft Excel": Programmatic access to Visual Basic Project is not trusted Win32::OLE(0.1712) error 0x80020009: "Exception occurred" in PROPERTYPUT "VBProject" at Vba2Asc_simple.pl line 24. OLE exception from "Microsoft Excel": Programmatic access to Visual Basic Project is not trusted Win32::OLE(0.1712) error 0x80020009: "Exception occurred" in METHOD/PROPERTYGET "VBProject" at Vba2Asc_simple.pl line 24. Can't use an undefined value as a HASH reference at Vba2Asc_simple.pl line 24.The PCs were a mix of XP and Win7, all with Excel installed. There were successes and failures on both XP and Win7. I've tried with ActivePerl 5.8.8, 5.10 and 5.20. ISSUE 2:
Another problem ... whether the program ran successfully or not, an Excel process Source code: The error message points to something in line 24: for my $source ( in($wb_obj->{VBProject}->{VBComponents}) )Encountered errors in FETCH and STORE routines in package Win32::OLE::Tie of Lite.pm: Win32::OLE operating in debugging mode: _Unique => 1But why it works on some PCs and not others, hoping someone has an explanation and a solution. Thanks.
Back to
Seekers of Perl Wisdom
|
|