Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Nov 2003
    Maryland, USA
    Thanked 0 Times in 0 Posts

    Export query to formatted Excel spreadsheet (Access 2003)

    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.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 28 Times in 28 Posts

    Re: Export query to formatted Excel spreadsheet (Access 2003)

    One way would be to use Automation to manipulate the Excel workbook from Access after the export. See <post:=376,265>post 376,265</post:> 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.

Posting Permissions

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