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