How to get from writer table with images to database

I am trying to find a way to move a table with data and images in a writer file to a database (base or any other form/tool to later being able further process the records - including the pictures).

Thank you for any kind of help on this.


Most people recommend that you don’t save the pictures inside the database table, to reduce file size and also to reduce the risk of data loss in case the database file gets damaged. Instead of saving the picture in the table, save the file name, with or without the file path (it makes sense to keep all pictures in a single folder, in which case you don’t need the file path in each record - unless you have really many pictures, and you want to sort them in some way and have each category in its own folder).

Thank you for your comment.
I have realized that this needs to be done first. You are describing the process which I would like to automate due to the large number of images (~ 1400) involved.
I could not yet find a tool supporting/automating this step.

Here’s a wild guess that may or may not work: Save the file as an HTML file. With some luck (I didn’t test it), the pictures will be saved separately with links to them in the HTML file. You will then have a table structure with the information and file names instead of the pictures. Then you need to convert that to csv format.

Thank you for the hint! That worked. The filenames did not show in calc but after some clean up in the html file with sed I got what I wanted.

To show the community that your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers.

One big difference to tables in Calc or Writer is the necessity to define types for the columns of the Table and ALL rows have to obey this constraint.

So: Create a new database first, then in the tables pane you can define a new table.

To be able to edit the table you need a column with an unique key/id. A common approach is to have an Id column with an autoincremented value.

However I would copy the contents of the table to a new spreadsheet first and replace the pictures by the filenames of saved pictures.
If you have columns containing date and/or time you should think about the right format to store this in your database. The conversion may be done in Calc. The Id can be left empty.

After everything seems right you mark the whole table, copy to clipboard, select the Destination table in base and select paste from the context-menu. In the opening dialog you choose to append to the existing table and can then even select the imported columns.
The last big step(s) is creating forms for editing the table.

This is only a rough outline. Don’t underestimate this step. And, if you need access to your data by several people/computers you may need to install another database like mysql first, as the internal HSQLDB is not for multiuser-access at the same time…


Thank you for helping.
I cannot follow your suggestions yet:

  • You are saying "… difference to tables in Calc or Writer is the necessity to define types for the columns of the Table … ". I know that you can e.g. define the data format in calc while this is not possible in writer I guess - is that what you mean?

  • The pictures are embedded in the table of the writer document. I have found a tool to extract them but I cannot replace them with the link - this does not seem to work with that extension since Writer 6.1 - i am using

  • You are suggesting to “… copy the contents of the table to a new spreadsheet first …”. I could not find a way where the embedded pictures could be pasted into a calc sheet, while all other data is copied, the images are not.