Is there a way to avoid the copy of all the datatable or simulate this scenary?

Hello, community.
I’d like to fix this workflow.

For example, I have this one:
There isn’t nothing in “Codigo” Column

image

Desired output is like this way :

image

But, I’m getting this result :
image

It’s getting all the datatable from “testf4”.
Any idea to fix it, please?

Here are the files :
1 - Copy.xlsx (16.7 KB)
Main.xaml (12.3 KB)

Hi,
I have tested your code, please remove the last write range in your code, it is causing the issue.

Balraj K