in reply to writing to an open Excel file
What module(s) are you using? What application are you using to "open the Excel file"?
If you are using one of the Spreadsheet::* modules, I'd agree with what others are saying about having the file open could be locking the file from being accessed/modified by other applications, which would include your script.
If you're using Win32::OLE in your script to directly control Excel and you're opening the file with Excel, it is possible for your script to take control over your Excel instance to modify the contents of the file. However, I personally would not go with that approach. Instead, I would close the file and have your script open a new instance of Excel to open the file for manipulation. See Re: Manipulating open excel sheet for more details on why having your script grab control over an existing instance of Excel could be problematic.
Regardless of which modules you use and which app you're using to open the file, I personally believe that you'll have far less issues if you don't have the file opened in any application when you run your script.
|
|---|