Importing tab delimited data into OpenOffice.org

Bill Campbell linux-sxs
Mon Feb 7 17:47:30 PST 2005


On Mon, Feb 07, 2005, Mike Reinehr wrote:
>Bill,
>
>What version of OO.org are you using? I'm using 1.1.2.

I'm running 1.1.1 on a SuSE 9.1 Professional box (yeah I have to
update it to 9.2 :-).

>To see what would happen, I created the following simple test file (named 
>temp.txt) and did a File/Open(type=text/csv):
>
>A1234 02/01/05 "This is a test" 101.99
>A1235 02/02/05 "This is another test" 299.97
>A1236 02/03/05 "Yet another test" 99.01
>
>(The fields are separated by tabs.) The File/Open dialog automatically 
>recognized the file as tab separated with double-quotes surrounding text (or 
>defaulted). The first & third fields were imported as text, the second field 
>as dates & the last field as numeric. (I used the letter A to precede the 
>check numbers since you said alphanumeric. Without the letter A, I'm sure it 
>would have been imported as numeric data.)
>
>What is the format of your date field? In my experience, OO.org recognizes the 
>usual formats.

I've tried a variety of options, tab delimited with no quotes around text
data, tab delimited with double quotes around text, etc., adjusting the
data sources options accordingly.  One strange thing that happened is that
with no double quotes, when there were fewer rows than columns, the amount
field would be treated correctly, but when there were more rows than
columns it was treated as text.  Go figure.

As I said in an earlier post today, I cheated, putting the data into an
intermediate mysql table, then getting that from the data sources.  The
only real trick there was installing the jdbc drivers for mysql, and
remembering how to configure it.

Bill
--
INTERNET:   bill at Celestial.COM  Bill Campbell; Celestial Software LLC
UUCP:               camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:            (206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

``Find out just what people will submit to, and you have found out the
exact amount of injustice and wrong which will be imposed upon them; and
these will continue until they are resisted with either words or blows, or
both. The limits of tyrants are prescribed by the endurance of those whom
they oppress.'' -- Frederick Douglass.


More information about the Linux-users mailing list