How do I get it to write a string under append range in my Excel file during the loop? ..see Pictures

Hello, I have a problem with my Excel spreadsheet. I’m extracting data from a multi-record webpage to Excel. Each time a data set is run through, I would like to add a string afterwards. I would have thought I could just add an append line event under appand range. However, the Excel file then crashes. How do I get it to write a string under append range in my Excel file during the loop? … See Pictures

Thank you for help…:slight_smile:

1 Like

Why not adding this “string” as an additional row in your datatable “dtextract”?
It would be then added to the Excel by the Append Range activity together with the other rows.

Cheers

hey, the datatable is automatically extracted from the web. How can I manually add another string to the datatable?

Use Add Data Row activity

Cheers

But how i can add their a string ? :sweat_smile:

Just enter an array value like
{"text1","text2","text3"}
Number and data types of array elements MUST match number and data types of the datatable columns.

Cheers

thanks for your help but when i test your array than come this :no_mouth:

Source: Private: Add Data Row

Message: The input array is longer than the number of columns in this table.

Exception Type: System.ArgumentException

RemoteException wrapping System.ArgumentException: The input array is longer than the number of columns in this table.
at UiPath.Core.Activities.ScopeActivity.OnFaulted (NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.Invoke (NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.FaultWorkItem.Execute (ActivityExecutor executor, BookmarkManager bookmarkManager)

It means you provided more elements in the array then is the number of datatable columns…

Cheers

yes thats the Problem my output datatable have sometimes 3 columns or 2 and so this solution dont work…

1 Like