I have several excel files (one per ID) that looks like this:
ID: 2000 (2 different cells)
City: New York (2 different cells)
Address: High Street (2 different cells)
Number: 4 (2 different cells)
And another excel file that has the following headers:
ID CITY ADDRESS NUMBER
I added a for each file in folder loop and stored the values in the first excel.
Then, I added a filter to filter on the ID that is in excel 1 (2000 in this example).
Now, I want to fill in the columns in the second excel, based on the variables I stored from the first excel.
For some reason I am not able to find how…
Can anyone help? How do I select the column in the datatable for which I want to add the data, after I filtered on the ID?
New Datatable = Datatable.Select("ColumnName = ‘StringValue’ ").CopyToDataTable
This expression is to filter the datatable and copied to another datatable.
Thanks for your reply.
Imagine the “StringValue” is a variable called “ID” and the column name = ID NUMBER.
Should it work by using New Datatable = Datatable.Select(“ID NUMBER = ‘ID’”).CopyToDataTable or should I be using different syntaxes (+ or ’ for the ID) as it is a variable?