If I have 2 File in folder , I want to append 2file but first sheet with first sheet and second sheet with second sheet. Book1.xlsx (8.7 KB) Book2.xlsx (8.7 KB) output.xlsx (8.8 KB)
You can read both excel and you will get two different datatables.
take write range, provide path of excel in which u want to append, give sheet names as per your names like first sheet & second sheet.
@prasath17 From your flow. I think it append all sheet all file to new file one sheet.
I want first sheet (file1) append with first sheet (file2) ---->write in outputfile3
and second sheet (file1) append with second sheet (file2)----> write in outputfile3 and write it new sheet.
Here is my suggestion: Append_sheets_with_order.xaml (11.8 KB)
I did not use Balareva activities.
Before running the WF, be sure to modify the argument to that it fits your folder_path:
@Hiba_B - Looks like your idea is similar is fine(please see my post above), you have used index and i have used file.exists…But her case looks different I guess based on the workbook @fairymemay provided…
Another downside of this approach(both yours and mine) is AppendRange on the sheet 2 won’t write the headers…
@fairymemay - Could you please provide the correct sheet names for your cases , both book 1 and book2 ?
Actually:
when i read only the first file (so when I have index = 0), I use write range with add headers.
Once the first file is read, I only use append range for the next files.
→ that way I don’t have to worry about the headers
→ I have 2 index (one is index_of_sheets, the other one is index of file)