cancel
Showing results for 
Search instead for 
Did you mean: 

Open Workbook Excel VBO and Open Connection Oledb

RitikAnand
Level 3
Hi,
I am working on an excel where I am first getting data using Oledb. Then without closing connection, in next Page I am creating instance and doing Open Workbook which is giving error as Excel is already open. It was working on BP v5 but giving this error in BP v6.5. Is there a way to Open Excel Workbook and have a Oledb connection at same time in v6.5? 
The excel has macros. We don't want to do Close connection and Open workbook each time because it is will take a lot of time.

Thanks

------------------------------
Ritik Anand
Senior Analyst
Capgemini
Asia/Kolkata
------------------------------
1 BEST ANSWER

Best Answers

I just ran a quick test of opening a workbook with the OLEDB VBO, pulling the contents of Sheet1, moving to a new page and using the Excel VBO to open an instance and pull the contents of the same sheet, and then moving back to the original page to close the OLEDB connection. Seems to work fine with no errors.

What connection string are you using for setting up your OLEDB connection?

As Balazs mentions in his reply, it might be best to try and split this across copies so you don't accidentally create a memory corruption or something, but from what I see it seems to work.

19146.png

Cheers,

------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------

View answer in original post

6 REPLIES 6

david.l.morris
Level 14
Why would it take a lot of time to Close the connection and Open workbook each time? Are you doing that a lot of times?

------------------------------
Dave Morris
Cano Ai
Atlanta, GA
------------------------------
Dave Morris 3Ci at Southern Company Atlanta, GA

Yes. The bot will process around 1000 rows of data each day. And it needs to update excel for most of them.

------------------------------
Ritik Anand
Senior Analyst
Capgemini
Asia/Kolkata
------------------------------

ewilson
Staff
Staff
@RitikAnand are you working with different workbooks in both cases (OLEDB is pulling data from Workbook A and then Excel VBO is trying to work with Workbook B) or the same workbook (OLEDB and Excel VBO are both trying to work with Workbook A)?

Also, which Excel VBO are you using? The Blue Prism standard VBO, the Extended VBO (available on the DX), or one of our partner VBOs?

Cheers,


------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------

I am working on same excel workbook. I am using the standard Excel and Oledb VBOs.

------------------------------
Ritik Anand
Senior Analyst
Capgemini
Asia/Kolkata
------------------------------

@RitikAnand I'd create a copy of the file and use it for OLEDB and use the standard Excel functions on the original workbook.​

------------------------------
Balazs Roman
Junior RPA Consultant
human+
Europe/London
------------------------------

I just ran a quick test of opening a workbook with the OLEDB VBO, pulling the contents of Sheet1, moving to a new page and using the Excel VBO to open an instance and pull the contents of the same sheet, and then moving back to the original page to close the OLEDB connection. Seems to work fine with no errors.

What connection string are you using for setting up your OLEDB connection?

As Balazs mentions in his reply, it might be best to try and split this across copies so you don't accidentally create a memory corruption or something, but from what I see it seems to work.

19146.png

Cheers,

------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------