AUTHOR'S MAIN SITE   > > > > >   TABLE OF CONTENTS for Open Office database tutorials.

Open Office Tutorials
Creating CSV files from Open Office Applications

You may find that the database being shipped with OpenOffice (ver.2 and higher) delights you as much as it has me. This page tries to help you use it.

Open Office's database, "Base", aka "ooBase" is free! But don't let that fool you. And it's not new. Big organizations, governmental and civilian, are adopting it as their standard office suite... and saving million$, but still Getting The Job Done.

There's more about ooBase in the main index to this material.

This page is "browser friendly". Make your browser window as wide as you want it. The text will flow nicely for you. It is easier to read in a narrow window. With most browsers, pressing plus, minus or zero while the control key (ctrl) is held down will change the texts size. (Enlarge, reduce, restore to default, respectively.) (This is more fully explained, and there's another tip, at my Power Browsing page.)

Page contents © TK Boyd, Sheepdog Software, 3/06-3/17.



Exporting from Open Office Applications to CSV Files _______________

Exporting CSV from Open Office

On this page you can learn how to create a CSV file from data in any Open Office application.

If you want to export data from a database, there is a useful discussion about some details of that in a thread about exporting records from an Open/ Libre Office database at forum.openoffice.org. (The link will take you to that thread.) Much of what follows is also relevant, even to exporting .csv from databases.

First move your data onto an ooCalc worksheet.

If your data is in a table in ooWriter, you can just select the columns and rows you want, press ctrl-C, move to an ooCalc sheet, click on the cell which will be the upper left corner of the table in the ooCalc sheet, and then press ctrl-V

If your data is in an ooBase table or query, just go to the ooBase main project manager window, right click on the name of the table or query (don't try this for a form, it won't work, or for a report unless you want to explore things I haven't explored!), click on "copy", and then proceed as before: Go to an ooCalc sheet, click on the cell which will be the upper left corner of the table in the ooCalc sheet, and then press ctrl-V.

As saving to CSV always saves all of the current ooCalc sheet, it will pay you to paste anything to be saved in a CSV file into the upper left hand corner of an empty sheet. (Empty cells to the right of, or below your table are ignored. Empty cells to the left of, or above your table result in extra (if empty) items at the start of each line, or extra lines at the start of the CSV file.)

Having caught your rabbit (got the data into an ooCalc worksheet), you just do a simple "Save As..." (Details follow.)

Click "File | Save As"

At the bottom of the Save As dialog box, change "Save as type" to "Text CSV (.csv)"

Some of the following only come up the first time you save some data in a CSV file, unless you take steps. If you have saved in CSV previously, you can "turn the questions back on" by doing a Save As in some other format, and then going back to doing a Save As in "Text CSV (.csv)"

Use the "Save In" and "File name" boxes to set where your data is saved, and the file's name, in the usual way.

If the "Edit filter settings" box (bottom of dialog) isn't ticked, tick it. (If you do lots of CSV exporting, and always use the same settings, you can untick this.)

Click the "Save" button.

You will... unless you've turned these warnings off (Bad Idea) get a new dialog, asking you if you want to "Keep Current Format" or "Save in ODF" Elect "Keep Current". ("Current" is CSV, even though, as you haven't saved in CSV yet, "current" isn't quite the way I'd describe it. Don't be confused.)

The next dialog has three things to set, and two tick boxes. These settings are what you won't see if you haven't ticked the "Edit filter settings" box earlier.

Character set: You are unlikely to want to change this.

Field delimiter: You probably want to use either a comma or the tab character. Don't worry over-much about this choice. Whatever is going to import what you are exporting can probably deal with either. Go with the comma, if in doubt.

Text delimiter: Use the quotes marks, even if your data has quotes marks in it.

The options controlled two tick boxes are a little esoteric. you can just tick "Save content as shown" and leave "Fixed column" unticked, and skip the next two paragraphs, or you can "eat your vegetables", and revel in the discourse to follow.

"Save content as shown": If a cell in your spreadsheet holds 3.99, and you have formatted that cell to show numbers with no decimal places, you will see "4" on the spreadsheet. Leave "Save content as shown ticked, and your CSV will hold "4"; untick it and your CSV will hold 3.99

"Fixed column width": If you tick this, values will be padded with spaces, sometimes to the left, sometimes to the right, so that each value in a particular column is made up of the same number of characters. Rarely useful, unless you are preparing CSV data for a really dumb program... probably something you wrote yourself, on a day when you were feeling lazy.

You'll probably be warned that only the active sheet was saved.

That's about it for CREATING CSV files in Open Office.



Where now? _______________

This is one of at least four pages discussing CSV files in my ooBase tutorials. In this page, you were shown how to export to CSV from OpenOffice.

Other pages....

... and of course there's also the site's main menu!



Editorial Philosophy

I dislike 'fancy' websites with more concern for a flashy appearance than for good content. For a pretty picture, I can go to an art gallery. Of course, an attractive site WITH content deserves praise... as long as that pretty face doesn't cost download time. In any case....

I am trying to present this material in a format which makes it easy for you to USE it. There are two aspects to that: The way it is split up, and the way it is posted. See the main index to this material for more information about the way it is split up, and the way it is posted.


Ad from page's editor: Yes.. I do enjoy compiling these things for you... I hope they are helpful. However.. this doesn't pay my bills!!! If you find this stuff useful, (and you run an MS-DOS or Windows PC) please visit my freeware and shareware page, download something, and circulate it for me? Links on your page to this page would also be appreciated!

PLEASE >>> Click here to visit editor's Sheepdog Software (tm) freeware, shareware pages <<< PLEASE


If you liked this ooBase tutorial, see the main index for information other help from the same author.

Editor's email address. Suggestions welcomed!     - - -    Want a site hosted, or email? I like 1&1's services.




Valid HTML 4.01 Transitional Page tested for compliance with INDUSTRY (not MS-only) standards, using the free, publicly accessible validator at validator.w3.org


One last bit of advice: Be sure you know all you need to about spyware.

. . . . . P a g e . . . E n d s . . . . .