Read Excel (LibreOffice Calc Spreadsheet) using ADODB Connection in UFT

Can we use Excel (LibreOffice Calc Spreadsheet) as a database and fetch values from it using ADODB connection from UFT?

Previously, we did the same with Microsoft excel with the below connection string.

"Provider=Microsoft.ACE.OLEDB.16.0;Data Source=" & strExcelPath & ";Extended Properties=""Excel 12.0 Xml;HDR=Yes;"&IMEX&""";"

My doubt is, we are migrating to the LibreOffice and I need to know if I can use similar way to fetch values from excel using ADODB. I tried similar connection string but I got an error saying “Unrecognized database format”.

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strExcelPath
Is it that LibreOffice excel do not have a feature to be used as a database or am I using the incorrect way to fetch the values?

:slight_smile:
LibreOffice does not provide any system data source provider drivers. (No idea what UFT could stand for; Internet suggest me “United Federation of Teachers”.)

Oh, thank you for your answer. UFT is automation testing tool. It stands for Unified Functional Testing. No idea why internet messed this abbreviation :grin:

So, Just for a confirmation here.I cannot use the calc spreadsheet as a datasource provider right?

No, I never told that you can’t; only that LibreOffice does not provide system drivers. You may find some third-party drivers; or you may find a way to use UNO to control LibreOffice, and then you may use Base to access data in spreadsheets in a DB way.

Hint: LibreOffice comes with a database and form and SQL query frontend called Base (#base).

Convert your Excel lists to dBase and use that with ADODB or ODBC or with LibreOffice’s native dBase driver for Base.