Hi there.
I have a project that i have to merge daily data from excel files that are in sub-folders of a folder named “Filename_dd_mm_yyyy” into one (without repeating the next day) to copy all that data into a excel macro.
im building a datatable by making a loop within a loop to get the files, but writing row by row.
ive tried searching various topics about this subject, tried read/write range, merge datables, but i cant seem to replicate the first result
someone advised me to use add.datarow{var1, var2, varN…}
can some help? thank you
build datatable DT2
assign getsubfolder=directorey:get:directory
for each item in GetSubFolder
assign folderPath = getSubFolder.ToString
assign GetFileFromDir= directory:getFiles
for each GetFilesFromDir = directory.GetFiles
write line item.ToString
excel app scope read range sheet1
for each row row in DT1 add datarow
write range DT2
(couldnt upload file)