Hello everybody and Happy New Year!
I have created a flow to extract data from a web page. The flow was created with Web recorder.
It worked fine until yesterday (06/01/2022) when the flow started to fail at the action Extract data from web page with the error: Failed to write into Excel.
Please see below the Error details:
Microsoft.Flow.RPA.Desktop.Robin.Shared.Runtime.ActionException: Failed to write into Excel. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x800A03EC
--- End of inner exception stack trace ---
at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, CultureInfo culture)
at Microsoft.Flow.RPA.Desktop.Modules.Excel.Actions.ExcelActions.GetProperty(Object o, String propertyName, Object[] arguments)
at Microsoft.Flow.RPA.Desktop.Modules.Excel.Actions.ExcelActions.WriteToExcel(Variant excelInstance, Variant startCol, Variant startRow, Variant valueToWrite, Int32 writeMode)
--- End of inner exception stack trace ---
at Microsoft.Flow.RPA.Desktop.Modules.Excel.Actions.ExcelActions.WriteToExcel(Variant excelInstance, Variant startCol, Variant startRow, Variant valueToWrite, Int32 writeMode)
at Microsoft.Flow.RPA.Desktop.Modules.Excel.Actions.ExcelActions.CreateNewAndWriteDataTable(Int32 column, Int32 row, DataTable table, Int32 writeMode)
at Microsoft.Flow.RPA.Desktop.Modules.WebAutomation.Actions.ExtractData.Execute(ActionContext context)
at Microsoft.Flow.RPA.Desktop.Robin.Engine.Execution.ActionRunner.Run(IActionStatement statement, Dictionary`2 inputArguments, Dictionary`2 outputArguments)
Please can you help me with this?
Thank you
Claudia
Something might have changed in the Excel file which you have defined in your "ExcelInstance" variable.
Please review that or post your flow.
Hi @fraenK
At this stage of the flow, I always open a new Excel file and after the data is extracted, I saved it on my computer.
There should be a "new Excel" action before your extract data from webpage action, which defines your ExcelInstance variable/session. Can't find that in your screenshots?
If I use this action and if I extract the data in an ExcelInstance, the excel file is opened automatically, I don't need to Launch Excel. At least this is what I see in the running flow.
In the Microsoft documentation, for this action exist 3 exceptions:
I always received the error: Fail to write values to Excel.
If I use LaunchExcel before Extrac data from web page into ExcelInstance, it will be opened 2 excel files.
Yes, sorry, you're right, it creates an instance.
Then there must be something wrong with the data your extracting, so it can't write that to an Excel file.
Who large is the table you are extracting?
Are there any special characters?
Did you try to copy paste the data into an empty Excel file? Was the data recognized correctly?
Just tried https://webgate.ec.europa.eu/rasff-window/screen/search
Works fine for me. Did you check if all cells are extracted correctly using the preview of extract data from webpage action? There is also a CSV export, which might be easier to process?
I know that I can use the csv, but I don't understand why my flow is not working anymore because I didn't change anything.
The website might have changed. If the CSV export provides the necessary data, then this is a better way to go compared to extracting data from a complex website "table".
Do yo have the Excel working fine on your machine? Please try launch excel action, check whether that is working or not.