Excel file not writable

I have an “Excel Application Scope” Activity. Inside that I loop an array that provides keys to update a workbook. I have an “Use Excel File” activity that I have tried both settings for the “save changes” check box. I use filter activities to select the row I want to update. I am able to update the cells desired. I try a Save activity and it fails saying the workbook is not writable. This is similar behavior when Save Changes is checked.

Just before the excel scope activity:
I tried a Kill activity with word “excel”.
I tried a Invoke Code activity with “File.SetAttributes(filePath, FileAttributes.Normal)”
I tried setting workbook visible to false in scope
only a Save As activity works. But I need to update the original

For Each: File C:\Users\filename.xlsm is read-only and can not be modified. If you need to update it, please make sure the file is writable.

Can anyone help?

did you make sure that the excel document is editable and not read only/protected?
Just for a test you could test the automation in a new blank workbook and check if it works. If it works the problem is in the excel document you’re trying to update, there might be some settings that prevent the document to be editable

This turned out to be my issue. Before the “Use Excel File” activity I opened up a database connection activity to the workbook and run a select statement. I added a “Disconnect from Database” activity to close that connection and am subsequently able to save the workbook. Apparently the connection forces integrity.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.