I need to copy the information from one column in a datatable to a specific column in another datatable I’m working with excel files that are not standarized and the column names can be different, what I’m doing is using an aditional file with the possible column names that I need to look for and the column name that I need to consolidate the data(lets call it MappingColumns File) where ‘Column Type’ is the column name that I need for my consolidated datatable and ‘Column Name’ is the possible name that will comes in the report depending of type
Now I filter the MappingColumns by ‘Type’ and stores filtered rows in a new data table ‘TypeTbl’
I set a string variable called ‘oldcolumn’ to “”
I loop ‘TypeTbl’ this way I get a new DataTable with the column structure that I need to consolidate the report
and now loop for each column in report and comparing if the column name is equal to ‘Column Name’ value in ‘TypeTbl’ by doing a for each row in TypeTbl