Re: converting .xls to delimited file

Started by Brian E. Pangburnabout 25 years ago4 messagesgeneral
Jump to latest
#1Brian E. Pangburn
bepangburn@yahoo.com

Excel 2000 has two options:
1. Select "Save-As" and then select "Save at type" = "Text (Tab delimited)"
2. Select "Save-As" and then select "Save at type" = "CSV (Comma delimited)"

If I remember correctly, earlier versions of Excel have similar options.

Hope this helps.

Brian E. Pangburn

"William Staniewicz" <wstan@localhostnl.demon.nl> wrote in message
news:200101101026.f0AAQfB16474@mail.postgresql.org...

Show quoted text

Is there any way to convert an Excel file (".xls")
to a delimited file? Maybe using sed?

Bill

#2David Merrill
dmerrill@lupercalia.net
In reply to: Brian E. Pangburn (#1)

On Wed, Jan 10, 2001 at 11:22:46AM -0500, William Staniewicz wrote:

Is there any way to convert an Excel file (".xls")
to a delimited file? Maybe using sed?

You can export an excel file, from within excel, to tab delimited,
comma delimited, and many other formats. xls is a binary format, so
sed will not do the job.

--
Dr. David C. Merrill http://www.lupercalia.net
Linux Documentation Project dmerrill@lupercalia.net
Collection Editor & Coordinator http://www.linuxdoc.org
Finger me for my public key

Three from the hall beneath the tree
Is, Was, and Shall Be
Come Wyrd Sisters swoop to the ground
Loosen the web that binds us down
Join with the hands of the Weavers Three
Is, Was, and Shall Be
-- Is, Was, and Shall Be, Beverly Frederick

#3Alfonso Peniche
alfonso@iteso.mx
In reply to: David Merrill (#2)

Try saving it as a .CSV file and then you can choose the delimiter you
want.

William Staniewicz wrote:

Show quoted text

Is there any way to convert an Excel file (".xls")
to a delimited file? Maybe using sed?

Bill

#4Jeff Eckermann
jeckermann@verio.net
In reply to: Alfonso Peniche (#3)
RE: converting .xls to delimited file

Excel can do this for you, if you use File -> Save As...
You will find various file types available. The list will vary according to
the completeness of your Excel installation. I believe that at minimum you
should have "tab delimited text" available, and probably csv as well (don't
use csv, it's evil). If I'm wrong, you'll need to get the MS Office CD and
reinstall Excel with more options checked...
If you want to import the result into Postgres, beware of CR characters, and
leading/trailing spaces in your fields. Excel will tolerate those spaces in
non text-type fields, but Postgres will not.

Show quoted text

-----Original Message-----
From: William Staniewicz [SMTP:wstan@localhostnl.demon.nl]
Sent: Wednesday, January 10, 2001 10:23 AM
To: pgsql-general@postgresql.org; pgsql-novice@postgresql.org
Subject: [GENERAL] converting .xls to delimited file

Is there any way to convert an Excel file (".xls")
to a delimited file? Maybe using sed?

Bill