Error in merging multiple excel files

i am getting this error while performing merging operationCapture Capture1 Capture2 can anyone here help me?


1 Like

@Are you sure the FolderPath has any values?


@kaavya Can you print the FolderPath variable in a message box after MainDT assignment, i just need to check whats in Folder Path afteris assigned.


Can u attach properties of Merge Data Table Activity…?

this error usually occurs when the activty having this error has a variable with null value in it
so the item.tosting is obtained from the variable passed to for each loop and that variable is FolderPath which is a string array variable

–i hope the string array doesnt have any value in it
to validate that use a message box in front of this for each loop and mention like this
if the value shows more than 0 or atleast 1 then we are good
else we need to check with the folder path that we have mentioned has any excel file in it

you are almost done
Hope this would help you
Cheers @kaavya

here it isCapture5

@kaavya here lies the problem, The folder Path is an array of String. Where actually it should have printed the file path.

@kaavya kindly try this and share the screenshot of the output buddy


1 Like

okay,let me check and know you


I guess the structure of target datetable (MainDt) and the source datatable are not matching…

how to do it now?

Kindly try with a Excel application scope and pass the filepath input as item.tostring
and inside the scope use READ RANGE activity from excel activities and try once

make sure that the FolderPath is with global scope in the variable panel under the scope column and also the type argument of for each loop is String

Cheers @kaavya


can you suggest me now what to do?


now the issue with read range is gone
can i have a view on the merge datatable property panel with a screenshot if possible
Cheers @kaavya

1 Like


may i know the source of TempDT like where it is getting value
and more over why we assign like this
MainDT = TempDT

kindly elaborate the scenario pls
Cheers @kaavya