Re: Import to excel to postgres based website? - Mailing list pgsql-general

From Richard Huxton
Subject Re: Import to excel to postgres based website?
Date
Msg-id 46A46193.80603@archonet.com
Whole thread Raw
In response to Import to excel to postgres based website?  (novnov <novnovice@gmail.com>)
List pgsql-general
novnov wrote:
> The answer may or many not be very postgres specific but...what are some
> possible routes that I could take to allows users to upload data from excel
> into a postgres via a website? I've never tried anything like this before.
> Are there standard modules that might help with this or will I have to
> create from scratch? I am obviously hoping to find something I can just plug
> in. Users would be expected to have the xls ordered properly for the routine
> to work.

You don't say what scripting language you're using, or what platform
you're running on.

If you have a Windows-based server, you could just install Excel and use
ODBC and some macros to open the uploaded file and process it.

If you're on a non-Windows platform then you'll want a module that can
read Excel files. There are various Perl modules on search.cpan.org that
might work for you.

Failing that, you can get people to save as a tab-separated-values file
(possibly via a macro so they just have one button to push). That is
easy to import via COPY.

--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: "Dawid Kuroczko"
Date:
Subject: Re: Difference between PRIMARY KEY index and UNIQUE-NOT NULL index
Next
From: "Chuck Payne"
Date:
Subject: Need help with bash script and postgresql