How can I figure out certain excel work book when there are many opened work books

Hi.
Here’s my question regarding to excel activities!
I want to figure out a certain excel work book when there are many opened work books!
Could I figure out one by using it’s file name?
and I want to close the certain work book in the end!

I really want to know how to solve this problem!
Thanks in advance!!

If you gonna try to select excel window using UiExploler then you will get all needed info, with file name of the opened excel file ( I’m using Excel 2010 ). Maybe this will help you since i don’t know the logic of checking and closing workbooks.

See this selector, this is what you get from an opened excel sheet

<wnd app='excel.exe' cls='XLMAIN' title='Book1 - Excel' />

So you can use that title attribute to decide on which workbook to write

Thanks,
Prankur

1 Like

You can always find the workbook by its title name.
Because Excel Application will not allow to open two workbooks with the same title.

Regards,
Karthik Byggari

Hi Dahye,

By Iterating the folder(FOR EACH) and using the condition “item.contain(“filename”)” in IF activity,
you can get the file and do your action and using close workbook you can close it.

Thanks,
suresh J

hey @DAHYE_HAN

You can refer this existing thread and let me know :slight_smile:

Regards…!!
Aksh

1 Like