cancel
Showing results for 
Search instead for 
Did you mean: 

Excel Functions integration

andrea_frauchig
Level 2
Hi, I have to create some operations within Excel, which require functionalities such as WorksheetFunction.Vlookup, or Range.AutoFill. I always get the same error message "the given key was not present in the dictionary". The check code tool does not give me any error when going through the code but in runtime I get the error and nothing happens. Any idea/experience on these methods and functions and how to work it out? Have looked up the forum for these keywords but could find anything related to the error I'm getting. Somehow it seems as BP does not have access to any of these functionalities (?). I'm running BP 5.0X and have imported the default Excel VBO. any input is highly appreciated! regards Andy
2 REPLIES 2

John__Carter
Staff
Staff
Hi Andrea the VBO maintains a list of Excel instances that it is 'aware' of, and that error means 'I don't have that instance in my list'. The list is updated when the VBO creates an instance itself or when it attaches to an instance that it didn't create.

andrea_frauchig
Level 2
I'm not sure you understood the issue, which may be due to me not explaining correctly. I have found that the Excel VBO lacks some parameters in the Initialise part of the VBO. Added some parameters there next ot he DLLs which allow BP to recongize the functions such as vlookup or other. now it seems to work. Was a pain nonetheless as someone would expect the VBO to contain the bits and pieces needed to launch basic stuff like a vlookup!