Sorting of excel workbook-sheets using invoke code activity

hi
The Solution to this problem is that using the
instance of Microsoft.Office.Interop.Excel.ApplicationClass you are allowed to open a workbook using xlApp.WorkbooksxlWorkBooks.Open(“Path of your File”)

Once the workbook is Open all you need to do is get all the sheet names and apply any of the
Sorting Technique.and move the sheet accordingly.

do find the Attached Solution.Main (2).xaml (14.2 KB)

Try adding below to code

xlWorkBook.Save()
xlApp.Quit()
1 Like

error BC31539 is happened.
Do i need add other library into Uipath ?

Hi @etss1016 Can you share some screenshots or sample file

I have fixed it, thank you.

can you share how you fixed it?

About BC31539 error, i added 「Microsoft.Office.Interop.Excel」 into Imports and solved the problem.

2 Likes

Hi @sanjay21051990,

I’ve try this and work. but what i’ve to do if the excel file has a password? the robot open the excel and ask a password.
please help.

Thank You