[postgis-users] Excel to Postgres

Jan Hartmann j.l.h.hartmann at uva.nl
Mon Feb 15 13:11:36 PST 2010


I never work with Excel, but using ODBC with Access is never a problem. 
Would that be an acceptable solution, e.g. linking the Excel data to an 
Access table and sending that to PostGIS?

Jan

On 15-2-2010 22:03, Steve.Toutant at inspq.qc.ca wrote:
>
> Hi,
> Every day I receive an Excel file containing lat long coordinates. I 
> need to import it to postgis.
> Currently, I save the Excel file in CSV format and I use ogr2ogr to 
> import the contents into postgis. I would like to avoid human 
> intervention.
>
> I tried unsuccessfully  to define an ODBC link on the Excel file and 
> use ogr2ogr with odbc to import it to postgres/postgis.
> I got this error
> [Microsoft][ODBC Excel Driver] External table is not in the expected 
> format
>
> Here is the command I sent
> ogr2ogr -f "PostgreSQL" PG:"host=xxx user=xxx password=xxx dbname=geo" 
> "ODBC:odbc_urg,test" -nln "testODBCxls" -overwrite
>
> where test is the sheet name inside the excel file
>
> Anyone has a better idea on how to programmatically import excel data 
> into postgis?
> thanks
> Steve
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>    
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20100215/42a1ef33/attachment.html>


More information about the postgis-users mailing list