cancel
Showing results for 
Search instead for 
Did you mean: 

Workbook name empty

LenaPütz
Level 3
Hi all, 

I hope this is the right place to state my question. 

I am trying to open an excel workbook in order to read from it later on. To do so, I use the excel vbo and do the following steps:
1. Create Instance (Enable Events = False)
2. Show
3. Open workbook --> Output should be saved in variable "workbook"

Since this is failing because of some "Nameconflict" message, I inserted a recovery path in order to resolve the conflict. All of this is working fine, the workbook is open at the end of these steps BUT the variable "workbook" stays empty. The end of the recovery stage is linked with the next action, which should get the worksheet. Might this be the problem? What could I change?

What am I doing wrong, how can I receive a value for "workbook"? 

Thank you in advance and best regards
Lena
6 REPLIES 6

ritansh.jatwani
Level 9
Hi @LenaPütz,

Can you please share the screenshot of your code and also the error message you are experiencing?​​​

------------------------------
Ritansh Jatwani
Consultant
EY
Asia/Kolkata
------------------------------

We have the convention to write in german, but I hope it still helps. All actions are Excel VBO actions, except the "Excel_Namenskonflikt". I attached a screenshot of this in the object studio, too. 

I check with a decision if the name is empty for test purposes.

handle receives its value from "instanz anlegen" which is Create Instance. "Zeige" is show. "Workbook öffnen" is open workbook, which uses handle and a path. 
27842.png
27843.png
27844.png
27845.png


------------------------------
Lena Pütz
------------------------------

Hi @LenaPütz,

Thanks for sharing the screenshot.

Generally Name Conflict message appears when you are trying to copy one or more worksheets to a workbook that has similar named ranges. Just verify if you are not using any duplicate sheet name/workbook name/excel. Due to this duplicity issue, the process breaks and it is not able to assign the workbook name to the variable "workbook" and as a result, you are seeing the value as blank. Now even, if you try to recover and resume the exception, it won't matter since you can't assign the value to "workbook" variable. 

Did you try opening the excel file manually? It might be possible that you will face the similar issue (Name conflict message) while opening the excel manually. If you still facing issues, please DM me or share the the bprelease file here only and i can help you in resolving the issue.



------------------------------
Ritansh Jatwani
Consultant
EY
Asia/Kolkata
------------------------------

Hi @ritansh.jatwani,

yes, manually I do not have any issues. I cannot see anything strange about the file when opening it.

------------------------------
Lena Pütz
------------------------------

Hi @LenaPütz,

Is it possible for you to share the bprelease file along with excel and i can try finding the actual root cause for the same?

Note- You can replace confidential data(if any) with just dummy data. ​



------------------------------
Ritansh Jatwani
Consultant
EY
Asia/Kolkata
------------------------------

If I understand it corrently, you get a name conflict alert when opening file with VBO, that you need to click before you can do anything with a file.
In that case disabling alerts might help:
https://gist.githubusercontent.com/aikudinov/a54504e24a0e0f862c1778f2d16c99fc/raw/4691d09bfebd789c5df77e26e70156555626d556/Excel%2520VBO%2520DisplayAlerts
(Copy all of this and right-click paste it as Action Page in Excel VBO)

You need to run this before opening a file, then you can enable them back (although there is not much point in it).


------------------------------
Andrey Kudinov
Project Manager
MobileTelesystems PJSC
Europe/Moscow
------------------------------