• Export query to formatted Excel spreadsheet (Access 2003)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Export query to formatted Excel spreadsheet (Access 2003)

    • This topic has 1 reply, 2 voices, and was last updated 19 years ago.
    Author
    Topic
    #431817

    I’m exporting data from Access to Excel using “DoCmd.OutputTo” and it works fine. However, I need the data formatted in Excel and would like to know if there is another way to export into Excel using a custom template. Or a way to automate formatting of the excel spreadsheet.

    Viewing 0 reply threads
    Author
    Replies
    • #1011602

      One way would be to use Automation to manipulate the Excel workbook from Access after the export. See post 376,265 for an example of formatting an Excel workbook from Access, and see WendellB’s tutorial Automation 101 for general info on Automation.

      Another way would be to run code in Excel to import the data from Excel and to format them. Excel has a CopyFromRecordset method that copies records from a DAO or ADO recordset into a worksheet.

    Viewing 0 reply threads
    Reply To: Export query to formatted Excel spreadsheet (Access 2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: