Dealing with Excel

Chris Smith smitty_one_each at bigfoot.com
Tue Oct 18 23:36:09 CEST 2005


>>>>> "Robert" == Robert Hicks <sigzero at gmail.com> writes:

    Robert> I need to pull data out of Oracle and stuff it into an
    Robert> Excel spreadsheet. What modules have you used to interface
    Robert> with Excel and would you recommend it?

    Robert> Robert

For simple enough tasks, I think you can make SQL*plus output HTML,
which Excel could suck up directly.
For a sripted approach, I would recommend getting an ADODB.Connection
object to your Oracle database
, opening an ADODB.Recordset against the connection
, setting an Excel.Range object to Cell A1
, enumerating your recodset field names into the cells of row 1
, setting the Exel.Range to Cell A2
, using the ridiculously fast CopyFromRecordset method of the
  Excel.Range to dump the recordset to the sheet.
HTH,
Chris



More information about the Python-list mailing list