Next: , Previous: Interacting with word processors, Up: Interacting with word processors


3.1 Exporting to OpenOffice using a flat file

This section describes how to export a database in a flat text file. Each entry will be on a separate line, with one field by column. Such file are often names CSV file (Coma Separated Value), because columns are separated by comas. Tabs or semi-columns are also frequently used.

Such Text/CSV file can be imported in OpenOffice(OOo) as a bibliography database. It may be convenient to export to OOo without using a database manager (DBM). However, flat file are less powerful than DBMs. The next section will describe how to use a DBM to export bibliographic data to OOo.

3.1.1 Export to a Text/CSV file.

3.1.1.1 The Database Configuration Dialog window

You first need to configure a few things. Go to the Options->Configure external database I/O to access the Database Configuration Dialog. From here, you can set up the way you want your bibliography to be exported. These settings are for database export, of which CSV export is a particular case.


Database Configuration.

Figure 3.1: Configure the database I/O first.

Fields
This table describes the correspondence between B3 entries fields (first column) and the column name in the resulting table (second column). The third column is for databases only, and specifies the type of the column. It will be ignored for text export.
Identifiers
Allows the creation a an additional column. Such a column is required for OOo. It contains a unique description of the entry, which will appear in your OOo document. It is possible to use the key of the entry, but other more “user-friendly” options may be used:
Authors + year
the author list (last names), the year;
Short Authors + year
the same, but if there are more than 3 authors, use 'first author, et al.' notation;
Number
the index of the entry in the list. Not very convenient, consider using the numbering option in OpenOffice instead.

Entry Types
Describes the correspondence between B3 entry types and the type that will appear in the “EntryType” column of your table.
Separators
Allows you to configure the way “Authors” and “Pages” fields will look in your table.

It is possible to save your settings to a XML file for latter re-use. As a consequence, it is also possible to use a pre-defined configuration file. Two files for OOo export are downloadable from the website:

3.1.1.2 Exporting a database

Got to the Export->Text/CSV menu, and choose the file where you want to export the data. The file must have the extension .txt or .csv to be recognized by OOo. An option dialog box appears, letting you set the characters to be used for delimiting columns and so on. Using tabulations to separate columns and double-quotes to delimit text is a reasonable choice.

3.1.2 Importing a Text/CSV file into OpenOffice.

This tutorial was done with OpenOffice 1.5.

OOo can import a database from a text file in CSV like format: a text file with columns.

3.1.2.1 Creating a new database

First of all, you must create a new bibliography database in OpenOffice. Click on the Data Source menu item in the Tools menu. A dialog box then appears. Create a new source (Create new source button, in the upper left corner). Set the general option as in figure fig:OODataSource: set the database type to text, set the database name and the directory where it can be found. Then switch to the “text” tab and set the format of you file: .csv extension for instance, and {tab} delimiter. The next panel allows you to select the table you want to use. One table should appear for each .csv file in the directory you selected in the “general” panel.


Open Office data source Open Office data source - setting options

Figure 3.2: Choosing the database format.

3.1.2.2 Setting up the bibliography database

For now, you have imported your B3 data as a database in OpenOffice. The next step is to tell OpenOffice that this database is the one where you can find references.

To change the bibliography database, jump to the tools menu and select the 'bibliography database' menu item (the one just above 'data source'). A new Window appears:


Open Office bibliography database

Figure 3.3: Open Office bibliography database manager.

The database you see is the default database with references to OpenOffice books, or the last one you used (in this case, you need not reading more of this tutorial ;-). You must change to the new one you just created by clicking on the 'data source button' (the last button in the toolbar). Your database must appear in the list: just select it.

OpenOffice will now prompt you for the field assignation: answer 'yes' to the question in the dialog box. Another window appears:


Open Office column assignation dialog

Figure 3.4: This dialog box allows you to set up the correspondence between B3 fields and the table column names.

You can also display it with the column assignation button.

You may set something different, according to the fields you chose to export or else. If some fields are set to 'nothing', OpenOffice will prompt you again for column assignation. You can answer 'no' to the question, and it will work. Of course, you won't be able to use the corresponding field in the bibliography.

3.1.2.3 You're done :-)

Here it ends! No you can insert reference as usual via the Insertion -> Index -> Bibliography entry menu. Bibliography management in OpenOffice is beyond the scope of this tutorial, so give a look at the OpenOffice help files for additional information.