Reading multiple excel files and writing it into single excel file

Hello Community,

I have scenario wherein i need to read 3 excel files from input folder
Input Folder- AM.xlsx,GM.xlsx,FGM.xlsx

And there is template folder it contains VarianceTemplate.xlsx( template consist of three input sheets(AM,GM & FGM) and their pivot sheets respectively.

Ouput Folder - Should Contain VarianceAnalysis 0121.xlsx , It should contain All the AM,GM,FGM & their respective Pivot Sheets

Though I am able to read all the three input files and write that to ouput file, But in the Output File contains AM,GM sheet values are null but FGM Sheet values are Present.

Note: I Am Reading&Writting Input Files with “Add Headers” Unchecked.

@NIVED_NAMBIAR @prasath17 Need Suggestions .Thank You


Can you clarify what you mean here?

If you mean the data table is empty, you can check the data with this:
dt1 isNot Nothing AndAlso dt1.Rows.Count > 0

When I debug the Workflow, It is Able to read AM.xlsx File And write that to AM Sheet of Output file ,But When I read GM.xlsx And Write that to GM Sheet, At that Point AM Sheet Is Contains Null Values ,though GM Sheet Contains Values

It sounds like your code is running some loop which is causing it to overwrite the sheet after you already wrote the first .xlsx (AM.xlsx). So I would suggest checking over that to make sure you are not writing over the other sheet again.

If you post some of your xaml or screenshots, we can help further.


@ShivuDundi - Could you please show us some steps with screenshot ? which will help us in debugging this further…