File is read only and cannot be overwritten

Hello all,

I am new to Uipath.

Currently I am trying to execute an automation that reads the names of all visible sheets in an excel file.
I have keyed in a script under the excel macro file.
However, when I run the macro, the below error appears and I can’t proceed.

Humbly seeking for guidance to resolve this issue. Thanks in advance.

Execute Macro: File C:\Users\ws009\Desktop\UiPath Test Run\Hidden Tabs\YouTubeActiveAndHiddenSheets\Excel file with hidden tabs.xlsm is read only and cannot be overwritten. It has been saved as file C:\Users\ws009\Desktop\UiPath Test Run\Hidden Tabs\YouTubeActiveAndHiddenSheets\Excel file with hidden tabs(15).xlsm

Hi,

Welcome to UiPath Forum.
Use Kill process activity to close the excel applications, though excel application is closed sometimes it will not be closed completely and can check it in task manager.
If you use kill process before Excel application scope then it will close all pre-executing excel file so that this read-only issue may be avoided.
In Excel application scope check with the properties panel " Create if not exists" might be enabled that’s why creating new excel files for each run.

Hope this may help you.

Hi,

Some how execute macro making xlsm file to read only mode.

Did you already enable all option in the macro settings in the excel application scope.

And also please un check the save excel option if you are just reading the visible sheet names from xlsm file so un necessarily it will not try to save xlsm for each and every action.

Please try the above option and let us know. If you still not able to resolve the issue. If possible please share us the macro code you are trying run in that xlsm to help you better. Thanks.

1 Like

Thanks Nithyac, appreciate your prompt reply.

Thanks Kiran for your advice, I am able to solve it after enabled all options in the macro settings and unchecked the save excel option.

1 Like

Glad to know that you are able to resolve the issue. thanks.

1 Like

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