I’m using write data table to excel. I’m using For each Row in Data Table and I’m using query inside the loop. If I didn’t append, the excel keep opening and replacing the value, if I check the append, it’s showing error “Range A:B Does not exist”, Create file if not exist is also checked. Any help on this? Thank !
Could you please share the screenshot of the flow which you have created?
Also the excel to which you are trying to append.
This is the screenshot.
Inside the for each row in DT there’s this activity :
Assigning SQL Query (Example : Select * from tableX where = ‘…’)
Sequence Query : Execute Query from assigned sql query and outputted to data table
Excel process scope : Write Datatable to Excel (Value of data table is based from executed query on number 2
In the Write Datatable to Excel activity, whats the Range that you have provided?
Or just provided the Sheet name?
Will it be possible to share the flow here?
Did we try with APPEND RANGE activity here if you are looking for appending data rows to the current file
UiPath.Excel.Activities.Business.AppendRangeXCopies the data in a table, range, or sheet and pastes it after existing data in another specified table, range, or sheet. The activity can be used with Excel files selected for parent Use Excel File...
That is process all the data first and then next to for each row use this append range activity
It’s not possible to share the flow because there’s credentials in it. But I will show u the screenshot of the write data table
@Rhys18 Ca you remove the range part in Write Datatable to Excel activity.
I tried this. I am facing 2 problem right now.
The excel keep open and close and write the data. Any solution how to make the excel stop closing and open to write the data?
I have more than 1 query, the next queries are outputted into rows and not in a record.
for point 1: you can use For each datarow loop into excel scope. Currenlty for each datarow Excel scope is opening.
Point 2 is not clear. Can you give more insights to it.
Using for each row in data table? What’s the variable I have to put “In” section?
I have 2 query
query 1 : Select Customer_number, phone_number from etc
query 2 : select customer_address
without range the output will be like this in the excel
I still confuse how to use this. Can u give an example in screenshots? Thanks
@Rhys18 if you want ot finter based on customer name , then
It’s done filtered. Now what should I do to make the excel stop close and open to write data table? I tried to use append range from palaniyappan solution but somehow it’s just replacing over and over
Can any1 help me on this? I really need it urgent