Results 1 to 2 of 2

Thread: Export a file in EXCEL format

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    3

    Angry

    Hi
    I'm a VB programmer and I ussaly access my files through ODBC driver using ADODB recordset and SQL statements. I want to export the result of thew sql request in Excel format. How can I do it ?

    Helping me = Saving me

    Thanx
    CU

  2. #2
    Member
    Join Date
    Aug 2000
    Posts
    60
    The easiest way is to use the Excel 9.0/8.0 Object Library reference.

    'Declare a new Excel object:
    Dim oXL as New Excel.Application

    'Open it.
    oXL.Open

    'Write to cells using activesheet.Cell(Row,Col)
    oXL.ActiveSheet.Cells(1,1) = myValue

    You can reference any cell like this. I'm not sure if the code is 100% as I typed from memory, but drop me a line if you need further assistance
    Barend
    JHB-SA

    Nothing is impossible, except skiing through a revolving door.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width