RE: [GENERAL] excell to postgres

2000-04-17 Thread Chris Carbaugh

If you really want to save the user some work/confusion, investigate what
you can do with VB under XL.

I would think XL allows you to set some options when export as CSV, with VB,
you could write your own Save function.

Chris

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On
 Behalf Of Hal Snyder
 Sent: Monday, April 17, 2000 4:41 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [GENERAL] excell to postgres


 Jeffrey [EMAIL PROTECTED] writes:

  I don't understand the need for such complicated solutions. Why not
  just create a table with your shcema, pg_dump the table and insert
  your delimited .xls file in the pg_dump file. Then re-install the
  pg_dump-ed table.

 The above step would save the MS user from converting his .XLS files
 to Access - all he does is Save As .CSV. Good idea.





Re: [GENERAL] excell to postgres

2000-04-17 Thread Fabrice Scemama

I'm a Linux user.
I've been using xlHTML and a home-made HTML2DBF rather than
ODBC with Perl's DBD::Proxy and DBD::ODBC because, to be
able to use ODBC, you need people to *name* the table they
create when using Excel. Well, they never do so.
Sometimes, they will name a table with 256 columns and
thousands of rows! and this, will *not* be handled by
stupid ODBC. No name being given to define the table will
make ODBC fail, as well.

You can open the file, then save it as CSV, etc.
But don't we want to make these kinds of things automatic?

That's why I use xlHTML. And yes, even with it, I come
across bad surprises, very often. So often that I've been
in the obligation to refuse that people send me Excel tables.
Access is the maximum I can tolerate (ODBC is ok at least).

Fabrice Scemama

Chris Carbaugh wrote:
 
 Can't you just export the excel sheets to a character delimited file and
 then import that into pgsql?
 
 With a little VB script in excel, you should be able to make pretty
 automated.  Just create you own "save" method that would save the sheet as
 the delimited file is a certain location. Then have a cron job parse the
 location for new files.
 
 Just my 2 cents (and man, the bank is hurtin' :)
 
 Chris
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]]On
  Behalf Of Fabrice Scemama
  Sent: Monday, April 17, 2000 12:22 PM
  To: Martin A. Marques
  Cc: [EMAIL PROTECTED]
  Subject: Re: [GENERAL] excell to postgres
 
 
  "Martin A. Marques" wrote:
  
   Is there any utilitie (for Linux if it can be) to pass from
  excell tables to
   postgres database tables?
  
   Saludos... ;-)
  
   --
   "And I'm happy, because you make me feel good, about me." -
  Melvin Udall
   -
   Martín Marqués  email:  [EMAIL PROTECTED]
   Santa Fe - Argentinahttp://math.unl.edu.ar/~martin/
   Administrador de sistemas en math.unl.edu.ar
   -
 
  You might use C OLE -- a C lib which was designed so as to
  import OLE files to other formats. An application is xlHTML
  (excel to HTML). I use xlHTML to import excel tables, then
  convert the HTML to DBF using a perl script. For some reason,
  xlHTML's author did not code a xlDBF file; and I'm not familiar
  with C. I'd be interested in something better than my
  solution (which I can send to you if you wish so).
 
  xlHTML:
  http://www.gate.net/~ddata/xlHtml/index.htm
 
  Regards
  Fabrice Scemama
 

-- 
"How could  this be  a problem in  a country  where we have  Intel and
Microsoft?" (Al  Gore, Vanity Fair, January 1999  issue, talking about
Y2K)