in reply to OLE module working 'part-time'
I can only guess that @csvFiles doesn't contain what you think it should. Excel doesn't like two worksbooks open that have the same (base) filename. Maybe that's part of the problem, or maybe Excel doesn't like that particular name. Output the sheet names before your script tries to set them, or hardcode the names and try that.
As an aside, you have an error in your error message that use strict; would have caught:
open (csvFILE, $file) || die "Cannot open $csvFile $!\n";
That code will never produce a meaningful error message because $csvFile will either be empty or the previous filename at that place in the code.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: OLE module working 'part-time'
by Aim9b (Monk) on Sep 24, 2007 at 20:06 UTC |