Merge excel in one but missing tabs

Hi guys, I want to merge different excel in one excel and separate with different tabs, I follow YouTube to do, some times it works, some times the result missing one tab, could you help me to check where is wrong? Just like below pic, this spreadsheet missing [Sheet2], some times missing [ Sheet3], some times it doesn’t missing any one. The missing tab is unstable but will happen
test-merge.zip (27.4 KB)
.
image

Could you help me to find where have the problem? Thank you guys!

@LEILEI

I have just executed code and the output is perfect. There is no errors in your code too.

Regards

Thanks, sometimes missing is happened.
Do you think I use the studio trial version and sometime is unstable?

@LEILEI

You are using the excel scope activities so sometimes it may cause the issue too so if possible use the workbook activities instead of excel.

Excel activities will open the excel file and then only it runs the operations where as workbook activities won’t open the excel. So, try to use the workbook activities.

Hope it helps!!

1 Like

@LEILEI

If you find the solution please do mark as solution to close the loop.

Happy Automation!!

@vrdabberu thank you very much.
when I use your method to run, it show me the error message, how can I do that?

@LEILEI

Have you given the output of the read range workbook as dt1?

Regards

Oh, It works!
But still have one question that is why the result excel doesn’t include raw data’s first row?
image

@LEILEI

Have you checked the add headers as true in write range activity?

Hope it works!!

YOU are AMAZING!
Thank you very much :grinning:

1 Like

@LEILEI

Thank You

Happy Automation!!

I also have a question that when I use excel scope [activities]? what is the Pros for excel scope?

@LEILEI

Inside the “Excel Application Scope,” you can add various Excel-related activities such as “Read Range,” “Write Range,” “Get Cell Color,” “Filter Table,” etc. These activities allow you to perform actions like reading data from Excel, writing data to Excel, formatting cells, filtering data, and much more. The “Excel Application Scope” activity ensures that the Excel application is closed automatically after the activities inside the scope are executed. This helps release any resources used by Excel and keeps your automation efficient.

Regards

I also have other process to do just like run the macro, use VBA to change the tabs name and so on. Do you think I can go on use excel scope function? I am worry about it will cause some mistakes, thanks.

@LEILEI

Yes, you can use the excel scope for those it will not cause any issue.

Regards

1 Like

Hi @vrdabberu , I have another question is related to invoke VBA, but give me the error code as :0x800a9c68. Do you think this error information is same with I use excel file activities? Or can I use workbook to invoke VBA instead of excel scope? Thank you.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.