Home | Hardware | Internet News |Web Hosting |IT Management |Network Storage
LinuxPlanet
Search 
  Power Search | Tips 

 Front Door
 Discussion
 LinuxEngine
 Opinions
 Reports
 Reviews
 Tutorials
 News
 Technology Jobs

 Browse by subject.
Free Newsletter

Linux Planet
Linux Today
More Free Newsletters

Be a Commerce Partner


















internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

Print this article
Email this article

   LinuxPlanet / Tutorials







Creating a Contacts Database in OpenOffice
Managing Contacts

Carla Schroder
Thursday, March 20, 2008 04:36:32 PM

Last week we learned how to make pages of labels, business cards, and form letters using OpenOffice Writer and Base. The steps for setting up any mail-merge document in OpenOffice are easy; the one potentially gnarly bit is creating your contacts database in the first place. Your contacts list must be in Base, which is a bit of a pain. But the good news is Base can import data from most other databases, spreadsheets, text-delimited files, and email address books. Figure 1 shows the import screen. Yours may have some different options, depending on your Linux distribution.

Base can connect directly to most relational databases, such as MySQL, PostgreSQL, Oracle, Adabas D, or any database that supports the Open Database Connectivity (ODBC) or Java database connectivity (JDBC) drivers. So it also functions as a graphical front-end to other databases, and you can use it to edit and change them. Address books, spreadsheets, and delimited text files are read-only. You can import their data into Base, but whenever you make a change to the source document you have to import the new data; you can't change it or directly access it from Base.

My contacts are in a KDE address book. Importing this into Base is so easy your cat can do it:

  • File - New - Database
  • Connect to an existing database
  • Yes, register the database for me and open the database for editing
  • Click finish, name and save the new file
  • You will see something like Figure 2. Double-click on the Address Book table to see your imported data
If Base doesn't have an option to directly import from your address book, try exporting your addresses into a comma-delimited .csv file. Then in the "Connect to an existing database" dropdown list, choose "Text". The next screen asks for the path, be sure to check "'Comma separated value files ' (*.csv)", and then select the correct delimiters. If it is a correctly-formed .csv file Base will have no problems with it. Here is an abbreviated example from my KDE address book export:
"Family Name","Given Name","Honorific Prefixes","Home Phone",
"Home Fax","Home Address Street","Home Address City",
"Home Address State","Home Address Zip Code"
"Schroder","Carla","Ms.","","","5678 EndOfTheLineLane",
"Red Cowtown","Oregon","54321"

Even though there are line breaks for readability, the real line breaks are at the ends of the lines with no commas. You have to have the exact same number of fields in your field definitions line, which is the first line in the file, and in your data lines. In this example there are nine. Any empty fields need "" for a placeholder, and each field is separated by a comma. You can use a comma, single space, tab, colon, or a semi-colon for the delimiter.

Next: Connecting to MySQL or PostgreSQL »

Skip Ahead

1 Managing Contacts
2 Connecting to MySQL or PostgreSQL
3 New Database From Scratch
Figure 1: The Import Screen
Figure 1: The Import Screen

Figure 2: The Address Book Database
Figure 2: The Address Book Database





Linux is a trademark of Linus Torvalds.


internet.com home | search | help! | about us

Jupiter Online Media

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers