The given key was not present in the dictionary.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
27-06-21 03:53 PM
During an excel operation I am getting the following error:
"Exception : Error while exporting to PDF. Details: The given key was not present in the dictionary."
Following are the steps which I am doing in BP:
Create instance->open workbook-> show->export worksheet to pdf->End
If I am trying to apply filter then also I am getting this same error.
Thanks
------------------------------
Kumari Yadav
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
27-06-21 05:00 PM
Generally 'The given key was not present in the dictionary' implies the VBO has no 'awareness' of the Excel file. The VBO keeps track of the instances and files it is using, and each time you perform an action it checks in its 'dictionary' to see it is 'knows' which instance/file to work on.
Refer link
------------------------------
Manish Kumar
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
28-06-21 12:54 AM
------------------------------
Emerson Ferreira
Sr Business Analyst
Avanade Brasil
+55 (081) 98886-9544
If my answer helped you? Mark as useful!
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
14-03-22 05:50 PM
We have done in the object where workbook has opened, the supplied handle number and workbook name is generated by vbo excel actions. still, we are receiving the same error . coul you please tell us how to resolvevthis error.
------------------------------
krishnaveni jaladi
Automation Specialist II
s&p global market intelligence
Asia/Kolkata
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
15-03-22 09:13 AM
------------------------------
John Carter
Professional Services
Blue Prism
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
16-03-22 10:08 AM
I had faced a similar issue, the reason behind this is you might be using two different VBO's in the flow:
I.e., for create instance, open workbook and show you might be using Excel VBO and for applying filter you might be using Excel Extended so the instance is not getting identified. Please make sure you use a single VBO for all the actions until you close the instance.
Hope this helps,
Regards,
Jeevan Rangaraju
------------------------------
Jeevan R
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
31-03-22 11:22 AM
I'm able to replicate this error as well, just by stepping into the Excel VBO when doing an action, and something as simple as opening a code stage, looking at the code, not changing anything and clicking OK to close the code stage is enough to cause this error. Once I've done this, I will keep getting this error until I kind of reset the object and execute again without opening code stages.
It seems the mere fact of opening a code stage causes the connection between the object and the excel instance to be lost. This of course makes developing and testing a pain.
There are probably other ways to trigger this error as well, I just thought I'd chime in with a peculiar find here as well.
------------------------------
Jesper Hededam
Developer
Codan
Europe/Copenhagen
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
20-09-23 01:10 PM
Hi all,
in my own experience, there is a bug here in the MS Excel VBO code. I have just experienced the same frustrating experience during debugging that makes no sense. Jesper Hededam called it out right in my case. Whenever I step into an excel object it loses the connection with the excel workbook. To me I think this means when we run something from the process and instantiate an instance of the object, that instance is different from the one we step into when we then perform a step into function.
In my case I was opening a report with a formatted Today() date so i stepped into it to change it on the fly and got the 'given key not present in the dictionary but when I stepped over it it worked fine. I can replicate this behaviour ad-inifinitum. To me I understand this as a bug in how Blue Prism is creating objects in memory and then which one is being referenced based on the action you take of stepping over or stepping into it.
The inverse behaviour is also true, if you step in first and continue stepping in the error doesn't appear, it only appears for me when I stepped over each stage first and then stepped in when I tried to read worksheet as collection.
regards
Dexter
------------------------------
Dexter Whelan
Senior Developer/Mentor
SAS
Europe/London
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
28-06-24 06:51 PM
Good day Kumari,
You may have already resolved this but I ran into the same issue where we used a component (wrapper object) that the BP software seems to disconnect the object from the Process layer. The way to get this to work is to use the Attach Instance in the Excel object and provide it the full file path and name of the file. This will have an output for the handle to re-establish your connection to then move on to perform other steps for example in my case I was trying to get worksheet name.
Hope this helps!
