How can I import a spreadsheet table to a database?

From Apache OpenOffice Wiki
Jump to: navigation, search


How can I import a spreadsheet table to a database?


(answer originally provided by Regina Henschel in users@dba.openoffice.org)

There are two ways:

  • You can create a database file which gives you access to the Calc-table. You cannot alter the table within base, instead you must use the Calc-table
  • You can create a new database file and import your Calc table.

I prefer to use the second way:

  • Create a new, empty database or open an existing one. Leave it open.
  • Open your Spreadsheet-table.
  • Select your data in the Calc-table and copy them into the Clipboard.
  • Go to the database file and use Edit → Paste.

You will get the "Copy Table" dialog, which leads you through the import.

Instead of copy & paste, you can also use drag & drop.

  • Reduce the windows so that you can see the Database pane of the database file window beside the Calc table.
  • Mark all your data in the Calc-table, including the headings.
  • Drag them to the database file window and drop them to the "Tables"-icon in the Database-pane.

You will get the "Copy Table" dialog too.

Personal tools