Search code examples
vbams-accessods

VBA - import/transfer Open Document Spreadsheet (ODS) to MS Access


Is it possible to import/transfer .ods files to Microsoft Access?

Duo to the documentation the method

expression.TransferSpreadsheet (TransferType, SpreadsheetType, TableName, FileName, HasFieldNames, Range, UseOA)

has the parameter SpreadsheetType. There are only Excel Versions listed. Seems there is no support for .ods? Has someone knowledge about how to handle .ods to MS Access?


Solution

  • There's no support for .ods files in Microsoft Access.

    Usually, you can import unsupported file types using an ODBC driver, but there doesn't seem to be an ODBC driver that supports .ods files either (in contrast to Excel files, text files, etc. which can be imported via ODBC).

    You can, of course, use Excel via OLE automation to convert the file to an appropriate format before importing or after exporting.