insert data from an microsoft excel

Started by Nageshwar Raoabout 21 years ago6 messagesgeneral
Jump to latest
#1Nageshwar Rao
NageshwarR@PLANETASIA.COM

Is there is way to load data from as Microsoft excel into database tables in
postgresql7.4.x
Thx
Rao

#2John DeSoi
desoi@pgedit.com
In reply to: Nageshwar Rao (#1)
Re: insert data from an microsoft excel

On Feb 16, 2005, at 6:16 AM, Nageshwar Rao wrote:

Is there is way to load data from as Microsoft excel into database
tables in postgresql7.4.x

Sure. Export the data into a CSV file. Then import it using psql and
the \COPY command.

http://www.postgresql.org/docs/8.0/interactive/app-psql.html
http://www.postgresql.org/docs/8.0/interactive/sql-copy.html

John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL

#3Matt
matt@kynx.org
In reply to: John DeSoi (#2)
Re: insert data from an microsoft excel

John DeSoi wrote:

On Feb 16, 2005, at 6:16 AM, Nageshwar Rao wrote:

Is there is way to load data from as Microsoft excel into database
tables in postgresql7.4.x

Sure. Export the data into a CSV file. Then import it using psql and
the \COPY command.

Or if it's something that needs automating, take a look at the ODBC
driver. There's a howto on using VBA to connect Access to Postgres -
Excel will be similar:
http://gborg.postgresql.org/project/psqlodbc/
http://gborg.postgresql.org/project/psqlodbc/genpage.php?howto-accessvba

Matt

#4David Fetter
david@fetter.org
In reply to: Nageshwar Rao (#1)
Re: insert data from an microsoft excel

On Wed, Feb 16, 2005 at 04:46:09PM +0530, Nageshwar Rao wrote:

Is there is way to load data from as Microsoft excel into database
tables in postgresql7.4.x

Once you've upgraded to 8.0x--a good idea anyhow--you can use DBI-Link
with the DBD::Excel driver.

http://pgfoundry.org/projects/dbi-link/

Cheers,
D
--
David Fetter david@fetter.org http://fetter.org/
phone: +1 510 893 6100 mobile: +1 415 235 3778

Remember to vote!

#5Ed L.
pgsql@bluepolka.net
In reply to: David Fetter (#4)
Re: insert data from an microsoft excel

On Wednesday February 16 2005 7:48, David Fetter wrote:

On Wed, Feb 16, 2005 at 04:46:09PM +0530, Nageshwar Rao wrote:

Is there is way to load data from as Microsoft excel into
database tables in postgresql7.4.x

Once you've upgraded to 8.0x--a good idea anyhow--you can use
DBI-Link with the DBD::Excel driver.

Wouldn't ODBC work for this?? I've pulled into Excel from Pg as
far back as pg 6.5, but never tried pushing from Excel into
Pg...

Ed

#6David Fetter
david@fetter.org
In reply to: Ed L. (#5)
Re: insert data from an microsoft excel

On Wed, Feb 16, 2005 at 08:05:55AM -0700, Ed L. wrote:

On Wednesday February 16 2005 7:48, David Fetter wrote:

On Wed, Feb 16, 2005 at 04:46:09PM +0530, Nageshwar Rao wrote:

Is there is way to load data from as Microsoft excel into
database tables in postgresql7.4.x

Once you've upgraded to 8.0x--a good idea anyhow--you can use
DBI-Link with the DBD::Excel driver.

Wouldn't ODBC work for this??

It probably would.

I've pulled into Excel from Pg as far back as pg 6.5, but never
tried pushing from Excel into Pg...

DBI-Link makes it pretty trivial to pull any tabular data into
PostgreSQL :)

Cheers,
D
--
David Fetter david@fetter.org http://fetter.org/
phone: +1 510 893 6100 mobile: +1 415 235 3778

Remember to vote!