Append text range does not exist

Hi,

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 !

Hello @Rhys18 ,

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.

image

Inside the for each row in DT there’s this activity :

  1. Assigning SQL Query (Example : Select * from tableX where = ‘…’)
  2. Sequence Query : Execute Query from assigned sql query and outputted to data table
  3. Excel process scope : Write Datatable to Excel (Value of data table is based from executed query on number 2

Hello @Rhys18

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?

Hi

Did we try with APPEND RANGE activity here if you are looking for appending data rows to the current file

That is process all the data first and then next to for each row use this append range activity

Cheers @Rhys18

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

image

image

@Rhys18 Ca you remove the range part in Write Datatable to Excel activity.

image

I tried this. I am facing 2 problem right now.

  1. 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?

  2. I have more than 1 query, the next queries are outputted into rows and not in a record.

@Rhys18

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.

  1. Using for each row in data table? What’s the variable I have to put “In” section?
  2. 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

image

Hi @Palaniyappan

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

CurrentRow(“customer_name”).ToString

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