I'm trying to write a value into a cell and then save the Excel file everytime something is completed, I tested on another Desktop Flow and is working, but I'm trying to do it in my main flow and is giving me this error. Could you help me with this? It doesn't have sense that this works:
Excel.LaunchExcel.LaunchAndOpenUnderExistingProcess Path: PEOIDPath Visible: True ReadOnly: False Instance=> ExcelInstance
Excel.WriteToExcel.WriteCell Instance: ExcelInstance Value: $'''No''' Column: $'''C''' Row: 2
Excel.CloseExcel.CloseAndSave Instance: ExcelInstance
but this no:
Excel.LaunchExcel.LaunchAndOpenUnderExistingProcess Path: PEOIDPath Visible: True ReadOnly: False Instance=> ExcelInstance
Excel.SetActiveWorksheet.ActivateWorksheetByName Instance: ExcelInstance Name: $'''Sheet1'''
Excel.GetFirstFreeColumnRow Instance: ExcelInstance FirstFreeColumn=> FirstFreeColumn FirstFreeRow=> FirstFreeRow
Text.ToNumber Text: CounterDone Number=> CounterDone
Excel.ReadFromExcel.ReadCells Instance: ExcelInstance StartColumn: $'''A''' StartRow: CounterDone + 2 EndColumn: FirstFreeColumn - 1 EndRow: FirstFreeRow - 1 ReadAsText: False FirstLineIsHeader: False RangeValue=> PEOIDList
Excel.CloseExcel.CloseAndSave Instance: ExcelInstance
Correlation Id: cfdb83db-83dd-4de1-ad78-b8b983b81ef1
Can't save 'PEOID.xlsx' because the file is read-only.: Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.ActionException: Failed to save Excel document 'PEOID.xlsx'. ---> System.Exception: Can't save 'PEOID.xlsx' because the file is read-only.
at Microsoft.Flow.RPA.Desktop.Modules.Excel.Actions.ExcelActions.SaveExcelInstance(Object activeWorkbook, String workbookName, FileVariant documentPathSafe, SaveExcelEnum saveSafe, ExcelSaveAsFormatEnum saveAsFormatSafe, String xmlMapName)
at Microsoft.Flow.RPA.Desktop.Modules.Excel.Actions.ExcelActions.CloseExcel(Variant excelInstance, Variant documentPath, Int32 save, Int32 saveAsFormat, String xmlMapName)
--- End of inner exception stack trace ---
at Microsoft.Flow.RPA.Desktop.Modules.Excel.Actions.CloseExcel.Execute(ActionContext context)
at Microsoft.Flow.RPA.Desktop.Robin.Engine.Execution.ActionRunner.Run(IActionStatement statement, Dictionary`2 inputArguments, Dictionary`2 outputArguments)

Report
All responses (
Answers (