How to combine multiple excel data in to single sheet?

i have ms excel workbook with multiple sheets in it with data. i wanted to combine all the data in to single excel sheet into same work book. can anyone help me with it.

  1. Read Range(Excel not workbook) → give the the sheet Name as "EachSheet " and stored it to datatable called dt.
  2. Add If Loop if file.exists(“Output.xlsx”) Then → Append Range → “Output.xlsx” → SheetName = Eachsheet → dt. Else → Write Range → “Output.xlsx” → SheetName = Eachsheet → dt.

Hope it Helpful!!

1 Like

Hi @Trinadh_Ponnamanda ,
You can use merge data,
If they are same format
Regards,
LNV

1 Like

Hi @Trinadh_Ponnamanda

Welcome to Community!!

I hope it helps!!

1 Like

@Trinadh_Ponnamanda

Excel Application Scope (workbookPath)
Assign combinedDataTable = New DataTable

For Each sheetName In sheetNames
    Read Range (sheetName)
    combinedDataTable.Merge(currentSheetData)
End For

Write Range (combinedDataTable) to newSheetName

Save Workbook
1 Like

Hi @Trinadh_Ponnamanda

=> Take Use excel file activity and pass the Excel File path.
=> Inside use excel file activity insert the for each excel sheet activity. Output - CurrentSheet
=> Inside for each Insert the Read range activity to read the excel file. In the range field give the CurrentSheet. Output - dt_Excel (Datatable Variable)
=> After Read range activity insert the Append range workbook activity to append the datatable to excel in one sheet. In sheet name field give the sheet name and give the dt_Excel in datatable field

Check the below image for better understanding.

Note - You have to use the Modern design activities to use the above excel activities.

Hope it helps!!

1 Like

Hi @Trinadh_Ponnamanda

1 Like

@Trinadh_Ponnamanda

Read range Enable Add Headers

1 Like