Thread

  1. Re: converting .xls to delimited file

    Brian E. Pangburn <bepangburn@yahoo.com> — 2001-01-10T12:49:11Z

    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...
    > Is there any way to convert an Excel file (".xls")
    > to a delimited file? Maybe using sed?
    >
    > Bill
    >
    
    
    
    
  2. Re: converting .xls to delimited file

    David Merrill <dmerrill@lupercalia.net> — 2001-01-10T13:37:02Z

    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
    
    
  3. Re: converting .xls to delimited file

    Alfonso Peniche <alfonso@iteso.mx> — 2001-01-10T15:32:18Z

    Try saving it as a .CSV file and then you can choose the delimiter you
    want.
    
    William Staniewicz wrote:
    
    > Is there any way to convert an Excel file (".xls")
    > to a delimited file? Maybe using sed?
    >
    >                         Bill
    
    
    
  4. converting .xls to delimited file

    William Staniewicz <wstan@localhostnl.demon.nl> — 2001-01-10T16:23:08Z

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

    Martin Lillepuu <martin.lillepuu@mail.ee> — 2001-01-10T22:13:34Z

    William Staniewicz wrote:
    > 
    > Is there any way to convert an Excel file (".xls")
    > to a delimited file? Maybe using sed?
    
    search for xls2csv on freshmeat. it works for simpler excel files but
    tends to segfault with complicated ones (with macros, etc) :(
    
    if anyone currently knows some better tool for the task, i'm all ears. 
    
    for one idea, it would be really cool if somebody extracted the msoffice
    filters from eq. openoffice and modified them to standalone csv/xml
    conversion tool. 
    
    --
    Martin Lillepuu | E-mail: martin.lillepuu@mail.ee | GSM: 051 56 450
    
    
  6. Re: converting .xls to delimited file

    Martin Lillepuu <martin.lillepuu@mail.ee> — 2001-01-10T22:20:43Z

    William Staniewicz wrote:
    > 
    > Is there any way to convert an Excel file (".xls")
    > to a delimited file? Maybe using sed?
    
    forgot to mention, if you are using static filename/one time process you
    could setup excel file as odbc datasource on windows computer and access
    it via unixODBC (or some equivalent) on unix box. or the other way
    around, send data from excel to postgres via postgres odbc interface.
    
    --
    Martin Lillepuu | E-mail: martin.lillepuu@mail.ee | GSM: 051 56 450
    
    
  7. Re: converting .xls to delimited file

    Rob Arnold <rob@cabrion.com> — 2001-01-11T12:20:26Z

    Save it as .TXT (Tab Delimited) format.  When you copy the data into
    postgres you may need to define nulls as ''.  Excel text output does not
    distinguish between nulls and blanks.  By default, the copy command defines
    nulls as \0 so you may need to change that.  I personally prefer that blanks
    be imported as nulls.
    
    I use the following copy command when importing:
    
    copy mytable from '/path/input.txt' with nulls as '';
    
    Also: watch your date formats (postgres is pretty good about this itself)
    and sometimes your negative number formats.  (i.e. -5 is OK 5- is not OK!)
    
    Finally, Excel has a tendency to export several "blank" rows at the end
    (delimiters are correct, but all fields are blank).  I generally remove
    these rows either before or after importing.
    
    --rob
    
    
    
    ----- Original Message -----
    From: "Alfonso Peniche" <alfonso@iteso.mx>
    Cc: <pgsql-general@postgresql.org>; <pgsql-novice@postgresql.org>
    Sent: Wednesday, January 10, 2001 10:32 AM
    Subject: Re: converting .xls to delimited file
    
    
    > Try saving it as a .CSV file and then you can choose the delimiter you
    > want.
    >
    > William Staniewicz wrote:
    >
    > > Is there any way to convert an Excel file (".xls")
    > > to a delimited file? Maybe using sed?
    > >
    > >                         Bill
    >
    >
    
    
    
  8. Re: converting .xls to delimited file

    Bruno Wolff III <bruno@wolff.to> — 2001-01-15T01:03:11Z

    On Thu, Jan 11, 2001 at 12:13:34AM +0200,
      Martin Lillepuu <martin.lillepuu@mail.ee> wrote:
    > William Staniewicz wrote:
    > > 
    > > Is there any way to convert an Excel file (".xls")
    > > to a delimited file? Maybe using sed?
    > 
    > search for xls2csv on freshmeat. it works for simpler excel files but
    > tends to segfault with complicated ones (with macros, etc) :(
    > 
    > if anyone currently knows some better tool for the task, i'm all ears. 
    
    I currently get data for my database backed web pages from some other
    people that keep it in excel files. What I am using to get at the data
    is xlHtml-0.2.7.2.
    
    I have tweaked it a bit. I have problems with dates showing up as numbers
    and need to check for what are effectively Julian days for dates as well
    as the more normal formats.
    
    
  9. Re: converting .xls to delimited file

    Rob Arnold <rob@cabrion.com> — 2001-01-15T14:12:19Z

    search freshmeat.net  there is a tool called something like xls2xml that was
    derived from the star office package.  I haven't tried it, but looks very
    good.
    
    
    --rob
    
    ----- Original Message -----
    From: "Martin Lillepuu" <martin.lillepuu@mail.ee>
    To: <pgsql-general@postgresql.org>
    Sent: Wednesday, January 10, 2001 5:13 PM
    Subject: Re: converting .xls to delimited file
    
    
    > William Staniewicz wrote:
    > >
    > > Is there any way to convert an Excel file (".xls")
    > > to a delimited file? Maybe using sed?
    >
    > search for xls2csv on freshmeat. it works for simpler excel files but
    > tends to segfault with complicated ones (with macros, etc) :(
    >
    > if anyone currently knows some better tool for the task, i'm all ears.
    >
    > for one idea, it would be really cool if somebody extracted the msoffice
    > filters from eq. openoffice and modified them to standalone csv/xml
    > conversion tool.
    >
    > --
    > Martin Lillepuu | E-mail: martin.lillepuu@mail.ee | GSM: 051 56 450
    >