Trying to import calc info into Base

dBase, Calc, CSV, MS ACCESS, MySQL, PostgrSQL, OTHER
Post Reply
CakesbyCora
Posts: 1
Joined: Thu Mar 05, 2009 1:13 am

Trying to import calc info into Base

Post by CakesbyCora »

hello-

I have put together a customer list in Calc and want to transfer or import it into basw so I can have a proper database of my customers and various pieces of info relating to each customer. I have tried to cut and past the info from calc into base, and all it does is past the whose calc spreadsheet into the first cell in the data base. How do I copy a base file with multiple columns and rows into database?

I am new to open office org and not a computer genius...I am a total END USER. Please put any answer or response way on the bottom shelf for me.

Thanks in advance for any help!!
OOo 3.0.X on Ms Windows XP
User avatar
r4zoli
Volunteer
Posts: 2882
Joined: Mon Nov 19, 2007 8:23 pm
Location: Budapest, Hungary

Re: Trying to import calc info into Base

Post by r4zoli »

Select whole sheet, and drop into table area in odb file, copy wizard will came up. Follow it and add primary key.
AOO 4.0 and LibO 4 on Win 8
Hungarian forum co-admin
chancm16
Posts: 1
Joined: Thu Apr 09, 2009 12:49 am

Re: Trying to import calc info into Base

Post by chancm16 »

I tried to do that: I copied the spreadsheet in calc and opened a new table in base. But when I pasted the data, it just copied 50 characters into the first field. Do you know what I'm doing wrong? :shock:
OOo 3.0.X on Ms Windows XP
User avatar
Villeroy
Volunteer
Posts: 31344
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Trying to import calc info into Base

Post by Villeroy »

Don't drop into the loaded view of the table. Drop into the tables area of the database window.
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
Sniffle
Posts: 2
Joined: Thu Apr 30, 2009 8:14 pm

Re: Trying to import calc info into Base

Post by Sniffle »

Basically you just need to create the database file and make sure it's registered. For what you are doing you do not need to create the table. That will happen from inside Calc.

Create your database and have it registered.
Open your Calc spreadsheet and make sure it looks as you want your tables, with column labels across the top.
Hit the "Data Source" button.
Find the database you had created and expand it.
Select your entire spreadsheet (ctrl-a) and drag it up to the Tables folder under your database.
A wizard will open to create (or append to) a table.

There are other resources available on the forums to explain Base more in-depth but one thing to keep in mind is that tables should have a primary key which is one column that does not contain any repeat entries. You can have the wizard create a primary key which will add a column in the table and just number each row. Or if you already have a unique column such as customer# or transaction# then you can tell the wizard not to create the key and you can manually edit the table in Base to make one of those columns the key.
OOo 3.0.X on MS Windows Vista + MS Windows XP, Fedora 10
marcov
Posts: 1
Joined: Wed Sep 02, 2009 2:28 pm

Re: Trying to import calc info into Base

Post by marcov »

r4zoli wrote:Select whole sheet, and drop into table area in odb file, copy wizard will came up. Follow it and add primary key.
Am I incorrect that this fails if you have (memo) fields with linebreaks in them?
OpenOffice 3.1 on XP+Vista.
User avatar
Villeroy
Volunteer
Posts: 31344
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Trying to import calc info into Base

Post by Villeroy »

marcov wrote:
r4zoli wrote:Select whole sheet, and drop into table area in odb file, copy wizard will came up. Follow it and add primary key.
Am I incorrect that this fails if you have (memo) fields with linebreaks in them?
A spreadsheet has no memo fields. It has either one of text, floating point number (double), blank cell or some error value.
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
jakes
Posts: 3
Joined: Thu Apr 22, 2010 10:47 am

Re: Trying to import calc info into Base

Post by jakes »

Or you can right click onto the the Tables area of your database and choose paste. Then in the "Copy Table" dialog you can put the name of a current table in the database for the "Table name" and choose the "Append data" radio button and click "Create". Data is now appended into the table.
OOO 3.1.1.1 on Mandriva 2010
Post Reply