Import Calc spreadsheet into a new table

Creating tables and queries
Post Reply
tdrannon
Posts: 2
Joined: Wed Jul 14, 2021 2:00 pm

Import Calc spreadsheet into a new table

Post by tdrannon »

Former Microsoft Access user. How do you import a csv Calc spreadsheet into a new table?
Open Office 4.15 on MacOS Big Sur
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Importing Data

Post by Villeroy »

If you imported the csv correctly with numbers and currencies being numbers, dates and times being formatted numbers, then you copy the cell range, open the database window, select the icon of the target table and paste. A dialog pops up where you specify if the copied data include a header row or not. And you can map the right pairs of columns to each other.
In Calc, hit Ctrl+F8 (menu:View>Highlight Values). All dates, times, numbers, booleans should be highlighted in blue.

It is also possible to import without the help of a spreadsheet but that requires some configuration.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
tdrannon
Posts: 2
Joined: Wed Jul 14, 2021 2:00 pm

Re: Importing Data

Post by tdrannon »

I am trying to create a new table with the import. Not sure how to do that.
Open Office 4.15 on MacOS Big Sur
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Importing Data

Post by Villeroy »

Same method, same import dialog, different options. But you have to take care of the data types. I recommend to create the valid database table first and then fill it with data from other applications.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Post Reply