Select an OPENED Excel file

Hello,

I have been searching all the afternoon how can I select an OPEN Excel file in Uipath (NO i do NOT have a path, NO I do not want the Excel to be closed) I just want to Activate and do stuff in an OPEN workbook. (I only have one excel opened at a time, let’s say the name is: Test.xlsx)

Thank you very much for your help.
Regards, Bogdan.

Hey, Bogdan.

If your excel sheet is open, treat it like you’d treat any other desktop application. Whatever task it is that you wanna do, teach your bot to do all the same steps you would do manually.

Btw what is it that you SPECIFICALLY want to do with an open excel sheet? That will help the community understand your requirements in a better way.

Hi,

Then how can I read the value of cell A1 for ex., or “enjoy” all other Excel activities like: Read Range or Write Range, I really NEED to be able to Activate the wrbk.

I don’t need to do nothing special, just Activate the opened wrkb, edit a range and close Excel, that is all.

Thanks. :slight_smile:

Do you just want it to be visible while reading and everything happens? If so, there’s a “visible” property checkbox in excel application scope that you have to select. That’s all, and you’ll see your excel file while the operations are carried out.

You can also see this thread.

However, I realise you don’t have the path to the excel so you can’t use excel application scope at all. In that case, if you want to extract the value of cell A1, make use of the search option in Excel. Also, you can use shortcut key combinations that excel provides you.

I have found this metod:

Dim objExcel As Excel.Application = System.Runtime.InteropServices.Marshal.GetActiveObject(“Excel.Application”)

But I don’t know why it returns an Object, rather then an Excel. App

Also I have noticed that Uipath is usig the custom Excel Class (uipath.excel.workbok.application) not the standard vb (microsoft.office.interop.excel.application)
Can i convert from one to the other? (with Cast or something …)

Thanks,
Bogdan