I found a solution to run a query and a Saved Import in MS Access. Perhaps this will help with the Excel problem.
First, I located the dao.dll for Access, downloaded it, and added it to Blue Prism folder. The Excel .dll should be just as available.
C:\Program Files\Blue Prism Limited\Blue Prism Automate
Microsoft.Office.interop.access.dao.dll
Microsoft.Office.Interop.Access.dll
In the comment block of the Initialize page of the MS Access – VBO object, I navigated to the Code Options tab. There I checked/added the DLLs to the External References and added namespaces to the Namespace Imports section.
External References
Microsoft.Office.Interop.Access.dll
Microsoft.Office.interop.access.dao.dll
Namespace Imports
System
System.Collections.Generic
Microsoft.VisualBasic
System.IO
System.Runtime.InteropServices
System.Diagnostics
Microsoft.Office.interop.access.dao
System.Data
System.Data.OLEDB
In the MS ACCESS – vbo object, I created a page (Open Query) with a data item called QueryToOpen, a handle, and a collection to receive the query results.
After checking the instance handle, I crafted a code stage that takes the handle and the QueryToOpen variable and used it in the code section. The code is as follows:
Dim accessDb As Object = GetInstance(handle)
accessDb.DoCmd.OpenQuery(QueryToOpen)
Additionally I created another page (Run Saved Imports) with a code stage that uses this code:
Dim access As Object = GetInstance(handle)
access.DoCmd.RunSavedImportExport(savedImportToRun)
I hope this helps,
Michael Zimmerman