print template for chart? addressbook without empty cells

Discuss the spreadsheet application

print template for chart? addressbook without empty cells

Postby soren » Fri Apr 11, 2008 12:09 am

Is there a function where each row of a spreadsheet is taken as a separate record, and I can specify a kind of template how to print the record? If so, where do I specify such a template, and how can I make empty cells to be ignored?

My application is at the moment to simply print a standard addressbook as exported by firefox. This gives a spreadsheet with columns like "name", "street address", "email" and also many of often but not always empty cells like "alternative email" etc. In a first lesson I simply want to print the cells of each record line by line, with empty cells being ignored, and probably a manual description added, something like

name: NAME1
address: ADDRESS1
email: EMAIL1

name: NAME2
address: ADDRESS2
email: EMAIL2
email: ALTERNATIVE_EMAIL2
OpenOffice 2.3.1 German -- Windows XP
soren
 
Posts: 14
Joined: Sat Jan 19, 2008 12:15 am

Re: print template for chart? addressbook without empty cells

Postby Villeroy » Fri Apr 11, 2008 12:27 am

Link the firefox address book to a Base document (read-only):
File>New>Database...
[X] Connect to existing database
Type: [Mozilla Address Book]
[Next >>]
[X] Yes, register database [Solved] What is "register the database"?
[X] Open database for editing
[Finish]
Save database as *.odb

Have a look at the table(s)
Go to the queries container and create a query (filtered set of table data)

Since you registered the database, you can use it in Writer and Calc
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 12.04, Apache OpenOffice 4.x
User avatar
Villeroy
Volunteer
 
Posts: 17291
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: print template for chart? addressbook without empty cells

Postby soren » Fri Apr 11, 2008 6:54 pm

Thanks for the helpful hint. I have now registered the addressbook, make a new writer document, press F4 to open the data source view, and successfully selected the entries.

The next dialog lets me define a print template like

<name> <vorname>
<email>
<adresse1>; <adresse2>; <phone>

and so on, which also works as expected. My next question: is it possible to do more sophisticated things in this template dialog? For example, if email field is empty I don't want to see an empty line but no line at all. Or if there is no address in the current data set, I don't want to print the semicolon separators. Probably there is some kind of "programming language" which allows testing for empty fields and stuff like that?
OpenOffice 2.3.1 German -- Windows XP
soren
 
Posts: 14
Joined: Sat Jan 19, 2008 12:15 am


Return to Calc

Who is online

Users browsing this forum: No registered users and 11 guests