Excel and pgSQL

How to import data from excel sheet to PGSQL database on Linux?

+2


a source to share


4 answers


An easy way is to export data from Excel to CSV using the function SAVE AS

. Then use the psql native function \COPY

. You can find more information on this using the command \? COPY

in psql or by visiting the docs in COPY .



+1


a source


Another option (a bit of a workaround, but it should work) is to import the Excel file into Access and then grow the resulting table in PostgreSQL over an ODBC connection.



0


a source


If you do this on a regular basis, you should look into Aqua Data Studio - I found it quite useful.

0


a source


I do this all the time and use Navicat [1] (about $ 79). You will need a window to start the client as linux client cannot import from Excel.

You can import almost any data format (Access, Excel, DBF, Lotus ...), define a mapping between source and destination that can be saved.

By the way, I don't work for Navicat! I just tried several DBA clients and this was by far the best for importing data.

[1] http://www.navicat.com/en/products/navicat_pgsql/pgsql_overview.html

0


a source







All Articles