in reply to Re^4: Win32::OLE called by subroutine only workes once
in thread Win32::OLE called by subroutine only workes once
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:
$KeepOpen = $Excel->Workbooks -> Add; # your code / loop here $KeepOpen -> Close;
Hope this helps,
-- zaaj
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Win32::OLE called by subroutine only workes once
by Anonymous Monk on Dec 23, 2016 at 21:13 UTC |