X-Original-To: pgsql-interfaces@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id DF80F475EDF for ; Fri, 11 Apr 2003 10:29:08 -0400 (EDT) Received: from wolff.to (wolff.to [66.93.249.74]) by postgresql.org (Postfix) with SMTP id 05332476128 for ; Fri, 11 Apr 2003 10:29:06 -0400 (EDT) Received: (qmail 26204 invoked by uid 500); 11 Apr 2003 14:29:18 -0000 Date: Fri, 11 Apr 2003 09:29:18 -0500 From: Bruno Wolff III To: Faizol Halim Cc: pgsql-interfaces@postgresql.org Subject: Re: export to excel format Message-ID: <20030411142918.GA26041@wolff.to> Mail-Followup-To: Faizol Halim , pgsql-interfaces@postgresql.org References: <20030411063503.79822.qmail@web10009.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030411063503.79822.qmail@web10009.mail.yahoo.com> User-Agent: Mutt/1.5.4i X-Spam-Status: No, hits=-34.8 required=5.0 tests=BAYES_10,EMAIL_ATTRIBUTION,IN_REP_TO,REFERENCES, REPLY_WITH_QUOTES,USER_AGENT_MUTT autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/85 X-Sequence-Number: 4024 On Thu, Apr 10, 2003 at 23:35:03 -0700, Faizol Halim wrote: > hi all, > first of all, I'm sorry if this is not the right > place to ask (if so, where should I direct the > question to?) > my question: > is there anyway that I could export some of my tables > to an excel format..? any module or pointers on how > this could be done..? If you output data as tab separated text files it will be very easy to import the data into excel. For a project I have where people that communicate with me use Windows and excel is useful for combining different sets of data (so that scripts can handle hundreds of similar data sets). To provide a way for them to get data back to me I wrote a perl program that gets data from the database and writes excel spreadsheets. It uses Spreadsheet::WriteExcel which you can get from CPAN. It seems to be pretty slow. It takes about 3 minutes to produce a 4MB spreadsheet. If you want to see the example to decide if it is something that might be useful to you, you can look at: http://wolff.to/area/excel.pl A good chunk of the program is for handling the web part of things as the sheets get generated on the fly (snail might be a better word) to satisfy web requests.