Write range in Filtered table in excel

Hi All,

I filter a table in excel. And I want to write range of a datatable into that specific table that i have filtered in the excel. How can I achieve that?


Can u elaborate ur question more @Adam1

I already made a filter table activity in excel. after that, I want to write data which is a datatable into that specific filtered table. lets say I filtered the table and I got row 10, 21 and 30. I want to only write data into that row.
I preferably want to avoid to use for each row and write the data instead of filtering and edit it because my excel file got 1000+ of rows.
Hope u understand my problem.

So @Adam1, u don’t want 1000+ rows to removed

Is it right?

Can you read the excel file into datatable DT1 and filter for the rows that you want to update and store in DT_Update. Filter DT1 for rows that you don’t want to update and store in DT_No_Update. Update DT_Update with necessary values, then merge with DT_No_Update. Write back to excel.

Perhaps something like this, but not sure if it’s anymore efficient that looping.

No. I dont want to remove other rows. I want to edit the data only on the filtered table

That’s why you merge the 2 datatables back together.

Table 1 (Original Excel File)
ID | Value
1 | a
2 | b
3 | c

Table 2 (Values to Update)
ID | Value
2 | New value

Use Filter Datatable activity on Table 1
Filter where ID is not in ID’s contained within Table 2 and store in DT_No_Update

Merge Table 2 with DT_No_Update

write to excel.

That’s one way to do it. Thankyou for the help. Aprreciate it.

Like I said, may not be any more efficient than looping, but perhaps?

Best of luck!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.