Ask Your Question

Is it possible to connect to Base from Excel using VBA? [closed]

asked 2012-02-29 12:17:33 +0200

Tim gravatar image

I have an existing spreadsheet set-up, but no need the db as well. The version of MS Office I have doesn't have access so I would like to use Base and use the existing spreadsheet.

The excel needs to stay in place as it is for use by a few non-technical users.


edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2015-10-15 05:47:59.451988


Hi @Tim, Have you found a solution to your problem? If one of the answers listed works for you, please mark it as correct. Otherwise, please give us more information so we may help you further. Thanks!

qubit gravatar imagequbit ( 2013-01-20 21:39:26 +0200 )edit

2 Answers

Sort by » oldest newest most voted

answered 2012-02-29 16:46:09 +0200

LibreOffice Base uses HSQL for its database engine. According to Wikipedia it has a JDBC driver so your best bet would be to try that. A quick search turned up several results indicating its JDBC implementation supports Java 1.6 and JDBC4,

HSQLDB is free open source software for which you can get commercial or community support. I would sugggest researching how Excel can connect to a HSQLDB using JDBC (most likely third-party software is involved). I lack the time to research this further, hopefully this will put you on the right track.

edit flag offensive delete link more



Well, if not the right track, at least it's a track! Thank you. I shall post back if I find an answer.

Tim gravatar imageTim ( 2012-02-29 19:37:04 +0200 )edit

answered 2012-02-29 17:14:10 +0200

LiboV gravatar image

Ok - your question is coming at the problem all wrong - at least from the perspective of Base.

First Base is not a database program, it is a tool for building front ends for a database. It has included, unfortunately, a customized version of HSQLdb which allows the database data to be embedded in an ODB (OpenDocument Database Document) file.

When you do this, embed the database in the document, there is no way to access the data from outside of LibreOffice - there is no JDBC or ODBC connector available.

Instead, given what you want to do, you would create your database using some real database package - that could be the standalone version of HSQLdb or SQLite(though it has some issues with Base) or MySQL or Postgres..etc. You would then connect the Base font end to the database and the Excel spreadsheet to the same database using VBA.

edit flag offensive delete link more



Thank you. I am halfway to learning other frontends, and maybe will be able to do this soon (ish).

Tim gravatar imageTim ( 2012-02-29 19:36:05 +0200 )edit

Question Tools


Asked: 2012-02-29 12:17:33 +0200

Seen: 4,642 times

Last updated: Feb 29 '12