OLEDB VBO Connection string for .xls file not working.

IC113

New Member
Hi,

I have been using the OLEDB VBO in Blue Prism for a few weeks, and have it successfully pulling information from one set of sheets that have a .xlsx format using the connection string:

"Provider=Microsoft.ACE.OLEDB.12.0;Data Source="&[File Path]&";Extended Properties=""Excel 12.0;HDR=YES;"""

However, there are also some which have a .xls format which I get an error message "Internal : Could not execute code stage because exception thrown by code stage: External table is not in the expected format." even though I have changed the connection string to:

"Provider=Microsoft.ACE.OLEDB.12.0;Data Source="&[File Path]&";Extended Properties="Excel 8.0;HDR=YES";"
as suggested on the excel connection strings website.

I did also try just saving the files as .xlsx using the Excel VBO but this resulted in them not being able to open as the format was not matching to the data.

Thanks in advance.
 

IC113

New Member
As it turns out, with this issue the connection string was correct but although the file had file type as .xls, the data contained in the file was in .xml format. To check this you should right click on the file and open with notepad (or equivalent) and see if the file is in xls format.

As a fix to this you can either look at an alternative connection string, or use the basic MS Excel VBO to read the data to collection then write to a new file in order to query. Both should work.

Thanks

Ian
 
Top