Export to .CSV then read into Calc and use as a Data Source

dBase, Calc, CSV, MS ACCESS, MySQL, PostgrSQL, OTHER
Post Reply
shaka_zulu
Posts: 2
Joined: Tue Dec 29, 2009 4:45 pm

Export to .CSV then read into Calc and use as a Data Source

Post by shaka_zulu »

Ok. I have the same problem. I see that this is an old thread but i need to ask one another thing since i am using 3.1 Openoffice.

I was doing as follows:

I am using posterita.com POS program where i am keeping my thing about job i am doing. I have and option to export whole stock list from Posterita to .csv file. This file is read-only and that is clearly stated in Openoffice Spreadsheet header (status bar on the top). I save as this file with .ods extension and after reopening that it is not read-only at least Spreadsheet says so. After that i am using this table as a source for database. I go to Database and then use option to connect to an existing database and i pick spreadsheet. I follow other options (most of them are default) and at the end Database offers me to save it in some database which i name as i prefer. Database is created and i can see table. When i check options or menu everything is gray and a just can't edit it at all. I can make a form from table but again i can't edit anything.

Did i make a mistake in database creating or i this translation from .csv to .ods!?

Thank you,

I've split your topic from the original thread as it is different question. (The Gurkha, Moderator).
Openoffice v3.1 for Linux 64bit, Kubuntu v9.10 64bit
eremmel
Posts: 1080
Joined: Tue Dec 30, 2008 1:15 am

Re: Unable to edit data imported into Base from spreadsheet

Post by eremmel »

Did you read this from above?
Base is a front end to different data sources, it isn't a database itself. There is a database provided, called HSQLdb, so if you have no other data source you can use this for creating databases, with Base as the front end.
This statement implies that you use Base as a front end to the connection you have made to calc (spreadsheet). Because Base is a database front end, it creates a 'table' reflecting the data in the spreadsheet. This front end definition is what you have saved in the ods file.
The trick described on this forum is (as I remember) to 'create a new database' document (connects to the internal database HSQLDB automaticly). You can now drag and drop the table from the calc-connected database document to your new document and the data with table definition is copied with help of a wizard.
It's Microsoft marketing that tells you computers are qualified for non-technicians
W11 22H2 (build 22621), LO 7.4.2.3(x64)
shaka_zulu
Posts: 2
Joined: Tue Dec 29, 2009 4:45 pm

Re: Unable to edit data imported into Base from spreadsheet

Post by shaka_zulu »

I read that definition from above but what is confusing me is that step when i create database after linking and i am giving it a name. That is confusing me... Thank you for your quick reply. I will try to find out the solution.
Openoffice v3.1 for Linux 64bit, Kubuntu v9.10 64bit
Piatkow
Posts: 8
Joined: Fri Jan 15, 2010 4:39 pm

Re: Export to .CSV then read into Calc and use as a Data Source

Post by Piatkow »

The "quick and dirty" solution that I used when having the same problem was to treat the imported table as a temporary table and simply use the SQL dialogue to insert the data into a blank table created within Base.

I am sure that there are better ways to do this but for a small number of columns it got the job done without much delay.
Open Office 3.1 on WinXP
PahRahdise_Ranch
Posts: 1
Joined: Tue Jul 20, 2010 10:26 pm

Re: Export to .CSV then read into Calc and use as a Data Sou

Post by PahRahdise_Ranch »

Hi,

I have been trying to do the following: 1- after creating a .CSV file, successfully create a Calc spreadsheet...after finding out the hard way how to set up the .CSV file, Calc file was created.
2- I spent hours trying to find a way to print mailing labels from this file? 3- Decided to create a Base file to generate my labels. First time...several hours later, I have a Base file (after making
it up from scratch). 4- I try to import date from Calc into new Base file...it imports, but I see nothing. I click on the top space between the 1st column and the 1st row and it shows all of my 35
fields.

A- Could I have accidentally imported it as white text on white paper? I have spent another couple of hours trying to change to color, but no luck.
B- As it added the Numerical Field required in the conversion, it starts with 0, and the data here is the first record. Then 1 is missing. 2 is the
next record, and all of the data is there.
C- I tried keeping it highlighted and set up my labels and saved them...but they only print the field names, not the data. The data is invisible to them.

I am doing something wrong. Is there a way to make my invisible text visible to the program?

I have printed out the steps and follow them: "Importing and Exporting Data in Base" from the help file.

Thanks,

Sharon
PahRahdise Ranch, Nevada
USA
OpenOffice 3.2.1 on Windows 7 Pro, 32 bit installation
evwool
Volunteer
Posts: 401
Joined: Fri Oct 09, 2009 9:40 pm
Location: UK

Re: Export to .CSV then read into Calc and use as a Data Sou

Post by evwool »

You could try doing this a different way. Create a blank database.
In the first row of your Calc spreadsheet, make sure that you have the field names that you want in your Base Table. Select and copy your Calc spreadsheet data.
On the Table 'page' of the database, press the Paste button on the Toolbar at the top of the Base window.
OpenOffice 3.1.1 on Windows XP and on Windows 7 Starter
Post Reply