Hi,
I’m having trouble merging two Excel files into one result file using sheetnames.
Background:
Both Excel files have many differently named sheets, but the amount and the names of the sheets are equal in both files.
Furthermore, the sheets have the same structure: Each sheet has only one column, always with the same header - but the column headers are different in both files: E.g. The column header from Excel file 1 is “Intern” and the column header from Excel file 2 is “Extern”.
Additionally, the contents of the columns (names and amounts) can differ in the two excel files, so they may not have the same row amount.
For merging I would like to use the sheet name as an identifier (like at the Join Data Table activity the column identifier) and would like to add for each sheet the column from Excel file 2 next to the column in Excel file 1.
Do you have any idea how to solve it? I haven’t found any activity that can handle this case (sheet as identifier).
Here is there any particular criteria for merging these 2 tables? Like some data matching required?
Else you can read one excel using Read range and using write range add it to the another excel.
Read Excel2 will give Datable , DT2
Use write range activity to Excel1, but make sure to provide the Range properly.
Thanks for your ideas! I just tried the Read & Write Range way.
Unfortunately, there occured two issues:
How can I create a separate “Result.xlsx”? In my solution the Result file is Excel1…
In each sheet of the Result file only the range of the Excel2 file’s last sheet (“400 PF 04-2022”) was added into each sheet of Excel1, see screenshots:
you have iterated over all sheets from excel 2, but will only work with the last read data
therfore on the second loop only the last worksheet data is added to the B1 range
just have a review on this part bring excel2 sheets together with the corresponding excel1 sheet