Export query result to an excel sheet

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • titli
    New Member
    • May 2010
    • 26

    Export query result to an excel sheet

    Hi Friends,

    I have some code in an already built application.

    Now the output pivots in .xls files is not matching with input data.

    The output .xls has summarized results whereas , the input files has raw data.

    Before the final output , many calculations are being done.
    I have been told to debug.

    What I need now is store the intermediate query results in temporary tables.

    Dim sBasePivotSQL As String
    Dim db As DAO.Database
    Set db = OpenDatabase(sS tagingDatabaseN ame)
    sBasePivotSQL = db.QueryDefs("q ryRisk").SQL

    I want the query result in a temporay table.
    So that after the application stops running , the temporary should be visible with the query data.

    Secondly , if that temporay table data can be exported to a new excel sheet, I don't mind the temporay table being deleted, and I can see the data in the excel sheet.

    Thanks in advance !!!

    Moumita
  • ADezii
    Recognized Expert Expert
    • Apr 2006
    • 8834

    #2
    Originally posted by titli
    Hi Friends,

    I have some code in an already built application.

    Now the output pivots in .xls files is not matching with input data.

    The output .xls has summarized results whereas , the input files has raw data.

    Before the final output , many calculations are being done.
    I have been told to debug.

    What I need now is store the intermediate query results in temporary tables.

    Dim sBasePivotSQL As String
    Dim db As DAO.Database
    Set db = OpenDatabase(sS tagingDatabaseN ame)
    sBasePivotSQL = db.QueryDefs("q ryRisk").SQL

    I want the query result in a temporay table.
    So that after the application stops running , the temporary should be visible with the query data.

    Secondly , if that temporay table data can be exported to a new excel sheet, I don't mind the temporay table being deleted, and I can see the data in the excel sheet.

    Thanks in advance !!!

    Moumita
    Convert qryRisk into a Make Table Query, then Export those results.

    Comment

    Working...