|
|
| Keep It Simple, Stupid | |
| PerlMonks |
Re^5: Win32::OLE called by subroutine only workes onceby Anonymous Monk |
| on Mar 01, 2012 at 17:35 UTC ( #957275=note: print w/ replies, xml ) | Need Help?? |
|
I'm writing a script which opens each excel file in a directory, reads some values from the workbook, then closes the workbook, and I had the same problem of Excel quitting when I closed the workbook. The inspiration came when I noticed the problem did not happen if I manually opened Excel first (with the default, blank "Book1") The work-around I used was to create a new workbook first, process all the files, (open, close, open, close...) then close my "KeepOpen" workbook when I was all done:
Hope this helps,
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||