|We don't bite newbies here... much|
install cpan Win32::OLE on cygwin - $Excel->Workbooks->Add; failsby BramVanOosterhout (Novice)
|on Aug 03, 2013 at 12:12 UTC||Need Help??|
BramVanOosterhout has asked for the
wisdom of the Perl Monks concerning the following question:
I started this thread as install cpan Win32::OLE on cygwin - t/3_ole.t ....... 1/58 OLE exception from "Microsoft Excel, but I can no longer add to that thread. If I offended, I did not mean to. My apologies.
I do have a final post re the issue raised. I believe there is a bug, but since many things work I am not sure. Below are my experiments and final conclusion. If I should post somewhere else, please refer me there.
Rather that flogging a dead horse in worrying about what does not work(as pursued in install cpan Win32::OLE on cygwin - t/3_ole.t ....... 1/58 OLE exception from "Microsoft Excel, ), I decided to see what did work. I used
Win32::OLE and Excel - Tips and Tricks by cacharbe (Curate) Thank you
I found that operations on an existing workbook work, including Add of a worksheet
But that $Book = $Excel->Workbooks->Add; FAILS
It seems to me that the parameter passed with the plain Add creates havoc. The rest is fine
I have read through blib/lib/Win32/OLE.pm but I do not understand what that says.
For now I will work around this issue by copying an existing empty workbook as the start for my work and carry on from there.
If you can suggest something I can use as a parameter to Add that would fake it, I am happy to try that. I have tried:
1. Empty: gives the message that this thread started with
2. 'Name': gives the message (file not found):
3. '' (empty string) or undef() gives the out of memory message like 1.
I don't know what else I can sensibly try. As I said I am happy to try other things if you have suggestions.
To me it seems there is a bug in the Add to an empty workbook that manifests itself in the configuration listed at the start of this thread.
Thanks for listening and all suggestions so far. Bram van Oosterhout