Am 04.01.2011 20:21, Rob Hall wrote:
Hi, I am a new user to Open Office.  I am trying to import a spreadsheet
(excel format) into Database to do sorting and queries on.  When I try to
load the spreadsheet it "default" loads into Calc and I can't get it into
Database.  Any help or pointing in the right direction would be appreciated.
Sorry if this doesn't get to the proper place for questions.



Thanks



ROB



From Calc to any database table connected to Base with write access (MySQL, PostgreSQL, Access, HSQLDB, ...)

I strongly recommend to create the empty table first.
Then do some testing if your sheet data consistently fit into the database table. Otherwise they won't import well.

=COUNTIF(A$2:A$999;$A2) returns 1 if A2 is unique
=COUNT(A$2:A$999)=ROWS(A$2:A$999) returns TRUE when there are only numbers without gaps in A2:A999
=COUNTA(A$2:A$999)=ROWS(A$2:A$999) same with any content
=COUNTBLANK(A$2:A$999) counts blank cells
=MAX(LEN(A$2:A$999)) [entered with Ctrl+Shift+Enter instead of Enter] returns the maximum lenght in A2:A999

Referencial integrity:
=ISNUMBER(MATCH(A2;OtherTablesColumn;0)) returns True if A2 exists in some other column.

Copy the cell range and paste onto the table icon (or drag the range onto the icon). Do not open the table. An import wizard pops up. It is always safe to let it add an automatic primary key. You may skip columns and rearrange columns so the right sheet columns get into the right table columns.

Yes, you can also connect a Base file to your spreadsheet document. This creates a read only pseudo-database which shows database ranges and the used ranges of your sheets as if they were database tables. This is usually enough for mail merge. You can also copy from Calc data from the pseudo-database into a real one.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@openoffice.org
For additional commands, e-mail: users-h...@openoffice.org

Reply via email to