Working with excel i am facing this issue

24.2.1-beta.15932+Branch.release-v24.2.1.Sha.3f90483a69af341308fcab9ad25ddc1395738901.3f90483a69af341308fcab9ad25ddc1395738901

Source: Write item HeaderCell

Message: File C:\Users\TIRUM\Downloads\AIDS - SEMESTERS\4-2 semester\Skill a thon - ui path\Excel reports consolidation\Sales Results\SalesResults-2024-03-11.xlsx is read-only and can not be modified. If you need to update it, please make sure the file is writable.

Exception Type: System.NotSupportedException

System.NotSupportedException: File C:\Users\TIRUM\Downloads\AIDS - SEMESTERS\4-2 semester\Skill a thon - ui path\Excel reports consolidation\Sales Results\SalesResults-2024-03-11.xlsx is read-only and can not be modified. If you need to update it, please make sure the file is writable. at UiPath.Excel.ExtendedWorkbookApplication.SaveWorkbookInternal()
at UiPath.Excel.ExtendedWorkbookApplication.AutoSaveWorkbookInternal()
at UiPath.Excel.WorkbookApplication.AutoSaveWorkbook()
at UiPath.Excel.WorkbookMetadataOperations.WriteCellWithOffset(String sheet, String range, String data, Int32 rowOffset, Boolean createSheet)
at UiPath.Excel.ExcelValue.SetOriginalValueAndPersist(Object value)
at UiPath.Excel.Activities.Business.WriteCellX.<>c__DisplayClass17_0.b__0()
at UiPath.Excel.ExcelApplicationExtensionMethods.TryExecuteAction(Application app, Action actionToExecuteWhenReady)
at UiPath.Excel.ExcelApplicationExtensionMethods.ExecuteInReadyState(Application app, Action actionToExecuteWhenReady, Int64 timeoutMilliseconds)
at UiPath.Excel.ExtendedWorkbookApplication.ExecuteInReadyState(Action actionToExecuteWhenReady, Int64 timeoutMilliseconds)
at UiPath.Excel.Activities.Business.WriteCellX.WriteCellInternal(IReadWriteCellRef cell, Object value, Int32 rowOffset, Func`1 cancel)
at UiPath.Excel.Activities.Business.WriteCellX.Execute(NativeActivityContext context)
at System.Activities.NativeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

1 Like

Error message is pretty clear, the file is read-only.

Hi @Tirumala_1643,

You might have checked the property Read-only of Excel Application Scope activity.

Make sure you are unchecking or clearing it’s check and try.

Thanks,
Ashok :slight_smile:

hello @Tirumala_1643

in the property section you u must uncheck the read-only option.
regards
Dheerandra Vishwakarma

Hi,

Make the file readable to write into the excel.

Thanks