Re: Import to excel to postgres based website?

From: Richard Huxton <dev(at)archonet(dot)com>
To: novnov <novnovice(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Import to excel to postgres based website?
Date: 2007-07-23 08:06:43
Message-ID: 46A46193.80603@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Chuck Payne 2007-07-23 09:34:37 Need help with bash script and postgresql
Previous Message Dawid Kuroczko 2007-07-23 07:21:53 Re: Difference between PRIMARY KEY index and UNIQUE-NOT NULL index