Why is LO making .odb files whenever I data merge in Writer? and can I make it stop?

I have a number of data merged documents I print each week/month. EG, Receipt.odt and Bill.odt . Each week I sub out last week’s spreadsheet of recipients for a spreadsheet of this new week’s recipients. To do this, I open Receipt.odt, go to Edit->Exchange Database, then I browse to the spreadsheet I want, and Define. That’s easy enough.

What I don’t understand is why the list of “available databases” keeps growing and you can’t remove/delete them in that window. There is no value in this list for me; I never have any reason whatsoever to return to those old lists, they just get in the way accumulating there. Some of them are only 4 or 5 lines long, seems weird to call them a “database” at all. Worse, I just noticed today a ton of .odb files in my documents folder – a real mess I did not notice growing under my nose. I recognize immediately that they have the same name as the .ods files I use to do data merges in Writer. Why the heck must these .odb files be generated and can I stop it from continuing to happen? Can I have them automatically go to the trash – will that eliminate the list in Edit->Exchange Databases? I do keep the .ods files for reference, but I don’t also need the same data in a .odb. I don’t think it even asked me where I want to save them, it seems to have just dumped them in my Documents folder.

Can I just delete these .odb files? Is there a simpler way to do data merges that isn’t going to generate unwanted files? Am I making this more complicated than it has to be? Or is having the .odb files auto-dumped to the trash going to solve this for me? If so, how do I do that?

Mail merge expects a database file. You cannot use a spreadsheet directly. So LibreOffice generates such database file for you, when you try to use a spreadsheet. Perhaps you use only exact one spreadsheet and its associated database file for mail merge. Each week you delete the old recipients and fill with the new recipients, and do not Exchange Database?

I want to save the old spreadsheets for reference. So that doesn’t solve the problem.

Registered databases are a user setting in LO. So every time you create a new one via Edit->Exchange Databases->Define, the list increases. And because the registration is a user setting mapping a name to an ODB, LO has to create a matching ODB file. You can delete entries from the list via View->Data Sources, Right click in the list->Registered databases…->Select the DB->Delete. But that won’t get rid of the ODB file itself.

Since some versions (code is from 2015, AFAIK sponsored by Munich / LiMux), Writer documents can contain an “embedded database”. Basically it’s just a subdirectory in the ODT / ZIP, which contains the files normally contained in the ODB. Problem is, these are AFAIK just created if you add them via Tools->Mail Merge Wizard…->Insert Address Block->Select Address List->Add and select an ODS and Finish.

Then you’ll see something like “vnd.sun.star.pkg://file:[path to your odt]/EmbeddedDatabase” in the “View->Data Sources, Right click in the list->Registered databases…” list. That entry is a fake registration and just exists for the ODT file.

So basically there is a solution, it works, but in the current UI it’s IMHO impractical to use in a sensible way.

FWIW: the ODB file basically just contains a link to the ODS file and some XML headers.


Shameless plug: there is an completely different, free and easier to use mail merge solution for LO at https://wollmux.org.

Installing the extension will add an entry “WollMux Seriendruck” to the sidebar, where you can just select a ODS file for your MM ODT file. The extension can do much more, but a minor feature is the “simplified” MM. The text is still in German, even if I start my LO with English UI :frowning: “Datei…” lets you select the ODS file and “Drucken…” lets you print the result to the various formats supported by the LO MM. HTH.

thanks. i’ll give that plugin a try. I’m a little nervous about the German, but I’ll give it a drucken.

It appears to be a linux-only plug-in. I’m married to Windows for my job – not a user-cutomizable setting, let’s say.

The extension is written in Java and is used on Windows and Linux since the beginning of the development 15y ago. So I’m curious why you claim it might just work on Linux. Do you get any error when installing it?

I have no idea what to do with this on windows. Forgive my ignorance, but where’s the .exe? I don’t know how to compile stuff.

The download is at Releases · WollMux/WollMux · GitHub. There is no exe. LO extensions are offered as OXT files, which can either be installed into the users private profile or into the LO installation, using the Tools > Extension manager (see Extension Manager).

oh thanks. I’ll give it a try, although the German scares me, not gonna lie.