Forum Discussion

cklein_1's avatar
cklein_1
Occasional Contributor
14 years ago

Saving an Excel File

I have a test that open's an excel file, I then get values from that file and us them a inputs for my test (using COM method). I then compare my results with values within the same worksheet. I also output my results with the same worksheet. I'm trying to save the file once my test is complete. However I cannot replace the existing file. Any suggestions?



Thanks,

Chris

2 Replies

  • Hi,



    Make sure that your file is not read-only and that you can save it from Excel manually. This is something related to your environment and, perhaps, read-write permissions.
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    Also, what script code/keyword code are you using to open your Excel for reading?  After you've read from your Excel file, are you calling the appropriate "close" commands?  If the file is still locked as "open" by previous script, you won't be able to save it again.