Hi Guys.
I have two XLSX files. All sheets from the Second file should be copied to the First file from the end. But everything should be done automatically via command line.
How can I do that?
Please, describe everything step by step, I am a very new in excel automation.
I have found a code for VBA:
-------------------
Sub CopySheets()
Workbooks("Book1.xlsx").Sheets("Sales").Copy _
After:=Workbooks("Dbook.xlsx").Sheets(Workbooks("Dbook.xlsx").Sheets.Count)
Workbooks("Book1.xlsx").Sheets("Marketing").Copy _
After:=Workbooks("Dbook.xlsx").Sheets(Workbooks("Dbook.xlsx").Sheets.Count)
Workbooks("Book1.xlsx").Sheets("Operations").Copy _
After:=Workbooks("Dbook.xlsx").Sheets(Workbooks("Dbook.xlsx").Sheets.Count)
End Sub
-------------------
It seems what I need, but how can I use it in the command line?
Thanks in advance.
I have two XLSX files. All sheets from the Second file should be copied to the First file from the end. But everything should be done automatically via command line.
How can I do that?
Please, describe everything step by step, I am a very new in excel automation.
I have found a code for VBA:
-------------------
Sub CopySheets()
Workbooks("Book1.xlsx").Sheets("Sales").Copy _
After:=Workbooks("Dbook.xlsx").Sheets(Workbooks("Dbook.xlsx").Sheets.Count)
Workbooks("Book1.xlsx").Sheets("Marketing").Copy _
After:=Workbooks("Dbook.xlsx").Sheets(Workbooks("Dbook.xlsx").Sheets.Count)
Workbooks("Book1.xlsx").Sheets("Operations").Copy _
After:=Workbooks("Dbook.xlsx").Sheets(Workbooks("Dbook.xlsx").Sheets.Count)
End Sub
-------------------
It seems what I need, but how can I use it in the command line?
Thanks in advance.