Skip to content

Microsoft Access data recovery support.#116

Open
pplupo wants to merge 14 commits into
Euro-Office:mainfrom
pplupo:db-support
Open

Microsoft Access data recovery support.#116
pplupo wants to merge 14 commits into
Euro-Office:mainfrom
pplupo:db-support

Conversation

@pplupo

@pplupo pplupo commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Description

This PR introduces native support for importing and reading database and data-warehouse files directly into the spreadsheet editor. It adds unified data-extraction pipelines for:

  • Microsoft Access Databases (.mdb)
  • SQLite Databases (.sqlite, .db)
  • DuckDB Databases (.duckdb)
  • Parquet Files (.parquet)

Motivation

For a sovereign and independent office suite, true data sovereignty means ensuring users are never locked out of their historical data. Legacy Microsoft Access (.mdb) databases hold decades of critical public, enterprise, and personal records. Relying on proprietary or Windows-exclusive software to open them poses a severe risk to long-term data accessibility. By natively supporting .mdb file reading, Euro-Office guarantees that users can independently recover and migrate their historical data at any time.

Furthermore, once the unified database-to-spreadsheet conversion pipeline was built to support .mdb recovery, it was a natural and low-overhead extension to include support for modern embedded databases like SQLite, as well as analytics-heavy formats like DuckDB and Parquet. This empowers data analysts and researchers to quickly inspect massive datasets directly from the comfort of their office suite, bridging the gap between legacy data recovery and modern data science.

Technical Details

  • Vendored libmdb (from mdbtools) directly into the source tree to ensure consistent cross-platform builds without relying on fragmented system packages (resolves iconv and locale struct mismatches).
  • Integrated libduckdb for reading DuckDB files and efficiently querying .parquet files via DuckDB's view functionality.
  • Added standard SQLite file parsing.
  • Built a unified translation layer that iterates through database tables and seamlessly converts them into individual worksheet tabs within the spreadsheet engine.

pplupo added 13 commits June 26, 2026 09:45
Signed-off-by: Peter P. Lupo <pplupo@gmail.com>
* Resolved `-Wreorder` compiler warnings in `MsBinaryFile/DocFile/OpenXmlPackage.h` by aligning the member initializer list with the class declaration order.

Signed-off-by: Peter P. Lupo <pplupo@gmail.com>
Signed-off-by: Peter P. Lupo <pplupo@gmail.com>
Signed-off-by: Peter P. Lupo <pplupo@gmail.com>
Signed-off-by: Peter P. Lupo <pplupo@gmail.com>
Signed-off-by: Peter P. Lupo <pplupo@gmail.com>
Signed-off-by: Peter P. Lupo <pplupo@gmail.com>
Signed-off-by: Peter P. Lupo <pplupo@gmail.com>
Signed-off-by: Peter P. Lupo <pplupo@gmail.com>
Signed-off-by: Peter P. Lupo <pplupo@gmail.com>
Our vendored libmdb sources (libmdb/*.c) use a newer MdbHandle struct
that includes the 'locale' field. The system mdbtools-dev on Ubuntu Jammy
ships an older version without this field, causing 'MdbHandle has no member
named locale' errors.

Since all libmdb .c files are compiled directly into BinDocument, there
is no need to link against the system libmdb (-lmdb). Remove the linkage
to eliminate the struct mismatch.

Signed-off-by: Peter P. Lupo <pplupo@gmail.com>
iconv.c has two code paths:
- #ifdef HAVE_ICONV: uses iconv_t (standard POSIX, no locale field needed)
- #else: uses mdb->locale (requires newer MdbHandle with locale field)

The system mdbtools-dev on Ubuntu Jammy has an older MdbHandle without
the 'locale' field. Defining HAVE_ICONV selects the iconv_t code path
which is the correct choice on Linux (iconv is always available via glibc)
and avoids the missing struct member error entirely.

Signed-off-by: Peter P. Lupo <pplupo@gmail.com>
Two fixes for iconv.c build errors with HAVE_ICONV defined:
1. Add 'ICONV_CONST=' compile definition - on Linux glibc, iconv()
   takes non-const char**, so ICONV_CONST must be empty
2. Add libmdb/mdbtools.h shim that redirects to our vendored
   mdbtools/mdbtools.h - ensures libmdb sources always use our
   version of MdbHandle (with iconv_in/iconv_out fields) regardless
   of what system mdbtools-dev provides

Signed-off-by: Peter P. Lupo <pplupo@gmail.com>
@pplupo pplupo requested a review from a team as a code owner June 30, 2026 12:42
@pplupo pplupo requested review from DmySyz and chrip and removed request for a team June 30, 2026 12:42
Signed-off-by: Peter P. Lupo <pplupo@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant