Hii,
I have Multiple files in a folder
I need to iterate to a files and store it in a datatable.
While its iterating over 2nd file, Whatever the values of 1st datatable are there I m getting the continuation in the second datatable and so on for the rest of the other files.
Like for example
1st File having data
12
23
45
2nd File having data
56
78
910
While iterating through 2nd file the value of datattable should be only
56
78
910
use build data table(Columns which you wants to see as output) and create columns then read the excel (Sheet2) then take one for each row in dt and use add data row and inside the array of row {currrntrow(“column1”).toString,currrntrow(“column2”).toString} dt as builddt output. take one write range and mention dt as build dt output
what you can do is after you completed you task with 1st datatable saved in a variable lets say DT_Excel, you can assign DT_Excel = Nothing.
This should work