How do I convert a Libreoffice database which has 3 tables and 2 relationships into Microsoft Access keeping the relationships?
Just finished testing this. Used Access 2000 & LO v5.3.0.3 to complete.
- Create new LO Base file with connection to your Access file (Connect to existing database->Microsoft Access)
- Open the LO Base file with the tables you want to transfer
- Copy each table in source (to be transferred) and paste in destination “Table” section (Access file connection; follow dialog when pasting)
Close all. Tables will be in Access file without relationships. Don’t know of any way to transfer relationships.
Thanks! Didn’t know you could do it this way. Still some issues with field types that I don’t understand, but looks promising. Tested in LO 5.2.5.1 in Windows. (Note: Can’t do this in Linux LO.)
This might depend on a few things. If your tables aren’t too big or too incompatible you might be able to copy the table (the grid of data really) into a spread sheet, then copy the spread sheet data into an access table. As for related tables, just ignore that they are related for the moment and move the tables. Once you have them moved you can open the relationships window and re-hookup relationships.
Here’s how this works:
1) Create or open an Access data base. Create each new table to be similar to your LO tables. I say similar because the field type names are not the same and you might have to change things like text into memo or the like. Here is an example
Leave Access open and switch to LO.
2) In LO select all records by clicking in the upper left of the open table.
and then copy them by right clicking and selecting Copy.
3) Open a new Calc or Excel file and paste your cells values from LO into it with ctrl-V. You will notice that field names are pasted in above the data. You won’t be using those header cells. You can delete the first two rows, or ignore them below.
Now select the cells that contain your field data (by left clicking and dragging in Excel or with similar cell selection methods marking two corners of the rectangle of data which you might need for larger tables), and again copy them to the paste buffer this time with ctrl-C (for copy).
4) Now paste your cells into your Access table by clicking on either the new record row, or the whole table
And hitting Ctrl-V (for paste).