Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2003
    Posts
    311

    Unanswered: Export a recordset to excel

    I have a recordset i would like to export to excel is there a way to do this?


    M~

  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    If you are working under Access and this recordset is stored in a table then use


    DoCmd.OutputTo acOutputTable, yuourTableName , acFormatXLS,
    path & Export_fileName & ".xls"

  3. #3
    Join Date
    Oct 2003
    Posts
    311
    no its not in a table its a rs how can that be done?

  4. #4
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Got through the rs and write in a file .txt or . csv
    (Comma Separated Values), which could be read or imported in Excel


    something like that

    Open "DATEI1" For Output As #1 ' Open für Output.
    do while not rs.EOF
    ˇˇ Print #1, rs("Field1") & "," & rs("Field2") & "," rs("Field3")
    loop

  5. #5
    Join Date
    Aug 2002
    Location
    Northampton, England
    Posts
    266

Posting Permissions

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