Open a calc file using ole object

Hello, I’d like give to the end user the option to use LibreOffice instead of MS Office when it comes to load spreadsheet files into my custom application.
Right now, I use OLE objects and I call “excel.application” to connect to the OLE object. This, of course, works when the customer have installed the MS Office Excel product.
I think it will be nice have my app being able to use LibreOffice too. I did read I can use “OO.application” for OpenOffice but I am looking for LibreOffice, someone can point me to the correct call to use? TIA!

Here is a snippet of the code I use now:

iRes = ole_excel.ConnectToNewObject("excel.application") // MS Excel
if iRes <> 0 then
	sError = "Error running MS Excel api"
	exit
end if
ole_excel.WorkBooks.Open(sfilename) 
ole_workbook = ole_excel.application.workbooks(1)
ole_worksheet = ole_workbook.worksheets(1)
lnumrows = ole_worksheet.UsedRange.Rows.Count
lnumcol = ole_worksheet.UsedRange.Columns.Count

If it works with OpenOffice and “OO.Application” (I have no idea whether it does or not, where did you read that?) then chances are it works the same with LibreOffice, depending on which one is installed.

Tried “OO.application” but didn’t worked, I only can guess LibreOffice uses a different scope name than “OO”. I am right now taking a look to the LibreOffice SDK to see if something must be done on my side. But I think my app does not have to require the user install the SDK too, to let him/her load an Excel file, OLE object is expected being registered by the standard installer. But I’m only guessing right now, still reading the docs and looking at help here in forum :wink: