Thread: Excell Exporter Enhancement

Excell Exporter Enhancement

From
David Horwitz
Date:
Hello All,

Apologies if this has been discussed on the list before, but I am a
newcomer to this list and could find nothing like this in the list
archive.

Essentially I would like to submit an enhancement to the Excel exporter.
At the moment the values exported are interpreted (by Excel 2000 at
least) as text values. This makes using Excel to analyse that data
difficult.  If the 'if then' statement is replaced by a select case
statement that:

a) formats the cell for the data type
b) inserts the data using the cells 'FormulaR1C1' property, which seems
to lead to more reliable reading of the format by Excel.

Attached is a version of Exporter module with just such a structure for
handling some of the more common data types

Regards

David Horwitz


--
****************************************************
David Horwitz                   University of Cape Town
IT Officer                      Private Bag
Multimedia Education Group      Rondebosch
            7701
dhorwitz@ched.uct.ac.za          SOUTH AFRICA
Tel:+27 21 650 3841              Fax:+27 21 650 5045
http://www.meg.uct.ac.za
PGP key: http://www.meg.uct.ac.za/dhorwitz/david_horwitz.acs
*************************************************


Attachment

Re: Excell Exporter Enhancement

From
Dave Page
Date:

> -----Original Message-----
> From: David Horwitz [mailto:Dhorwitz@ched.uct.ac.za]
> Sent: 04 March 2002 12:19
> To: pgadmin-hackers@postgresql.org; Andrew Deacon
> Subject: [pgadmin-hackers] Excell Exporter Enhancement
>
>
> Hello All,
>
> Apologies if this has been discussed on the list before, but
> I am a newcomer to this list and could find nothing like this
> in the list archive.
>
> Essentially I would like to submit an enhancement to the
> Excel exporter. At the moment the values exported are
> interpreted (by Excel 2000 at
> least) as text values. This makes using Excel to analyse that
> data difficult.  If the 'if then' statement is replaced by a
> select case statement that:
>
> a) formats the cell for the data type
> b) inserts the data using the cells 'FormulaR1C1' property,
> which seems to lead to more reliable reading of the format by Excel.
>
> Attached is a version of Exporter module with just such a
> structure for handling some of the more common data types
>

Thanks David. I've commited your update to CVS - it will appear in the next
release. I did make a couple of minor tweaks, one of which made it a far bit
quicker on my system (though the Excel.Application is dog slow anyway :-( ).

Regards, Dave.