Ask Your Question
1

Is it possible to connect to Base from Excel using VBA?

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

Tim gravatar image Tim
11 1 1 2

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.

Thanks.

delete close flag offensive retag edit

Comments

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 ( 2013-01-20 21:39:26 +0200 )edit

2 Answers

Sort by » oldest newest most voted
1

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

MagicFab gravatar image MagicFab flag of Canada
690 5 12 23
http://wiki.documentfound...

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.

link delete flag offensive edit

Comments

1

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

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

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

LiboV gravatar image LiboV
151 5
http://lo-portal.us/libo

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.

link delete flag offensive edit

Comments

1

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

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

Login/Signup to Answer

Donate

LibreOffice is made available by volunteers around the globe, backed by a charitable Foundation. Please support our efforts: Your donation helps us to deliver a better product!

Question tools

Follow

subscribe to rss feed

Stats

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

Seen: 630 times

Last updated: Feb 29 '12