Monday, May 13, 2013

Export a LibreOffice Base table as a CSV file

Previously I use Microsoft Access to manipulate and export out table data as comma separated values (CSV) files. I decided to use LibreOffice Base to do the same thing. It wasn't difficult to create CSV files in LibreOffice but the concept is different than Microsoft Office's. In LibreOffice, you have to create the text file document first before dragging the source table into the document. It took me a while to figure this out. The following steps illustrate how to do it.

  1. Click Start | All Programs | LibreOffice 4.0 | LibreOffice.

    LibreOffice appears.

  2. Click Text Document.

    A blank Writer document appears.

  3. Press F4.

    The Data Source pane appears.

  4. Expand the database nodes until the desired table e.g. biblio, is visible.


  5. Drag and drop the table onto the blank document.

    The Insert Database Columns dialog box appears.

  6. Toggle on Text.
  7. Select a Database column to export, e.g. Booktitle. Then click >. Repeat for additional columns, e.g. Author and Publisher.
  8. Edit the format string to include a comma or any other delimiter between the columns.


  9. Click OK.

    The table data is placed on the document.

  10. Select File | Save As.

    The Save As dialog box appears.

  11. Type in a file name e.g. mycsvfile. Choose the type as Text. Click Save.

    The CSV file is created.

1 comment:

Mario said...

Nice. I tried it with Calc spreadsheet, works fine also

Related Posts with Thumbnails