| From: | Steve Atkins <steve(at)blighty(dot)com> | 
|---|---|
| To: | pgsql-general General <pgsql-general(at)postgresql(dot)org> | 
| Subject: | Re: Import to excel to postgres based website? | 
| Date: | 2007-07-23 15:29:35 | 
| Message-ID: | 51171329-4081-485A-BAC5-A995771F0B7C@blighty.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
On Jul 22, 2007, at 11:26 PM, 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.
It's something that would be pretty easy, given the right web  
platform, quite
hard using the wrong one. Using perl, say, it would be less than a  
hundred
lines of code. (Take uploaded file, crack xls format to extract data  
using one
of the several CPAN excel reader modules, use DBI to insert it into  
the database).
Uploading CSV (comma separated values) is likely to be easier in  
languages
that don't happen to have support for xls, but CSV can only represent  
a small
subset of xls.
If the webserver itself it running on windows then there's all sorts  
of games you
can play by remote controlling an instance of Excel, but doing that  
tends to
be pretty fragile.
Cheers,
   Steve
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Csaba Nagy | 2007-07-23 15:56:58 | Delete/update with limit | 
| Previous Message | polen.t2006 | 2007-07-23 14:50:35 | regexp_replace |