Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Sep 2002
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Transfer Report to Excel (2k / 2003)

    I have a report, where information is derived from many dlookup's as well as queries.

    I'm aware of the Transferspeadsheet command, etc.. but as far as i can tell, that will not do what i want, and transfer the report, as it only appers to work on queries.

    So the data i have, is only in the report. Is there a way to transfer that report, somehow into excel ?

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Transfer Report to Excel (2k / 2003)

    Have you tried:
    <code>DoCmd.OutputTo acOutputReport, "report_name", acFormatXLS, "C:file name.xls"</code>
    Note that the format may not be great in Excel.
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Transfer Report to Excel (2k / 2003)

    Interactively, you can use File | Export... to export a report to an Excel workbook.

    The VBA equivalent of the File | Export... option is DoCmd.OutputTo:

    DoCmd.OutputTo acOutputReport, "rptSomething", acFormatXLS, "C:TestReport.xls"

  4. #4
    3 Star Lounger
    Join Date
    Sep 2002
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Transfer Report to Excel (2k / 2003)

    What happens, is although i can get and look at the report.... if use that command on a button, it will crash access.. when i shut access down from cntr-alt-delete... it will save the excel file.. however.. if you click on that, you get 'file format not valid'

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Transfer Report to Excel (2k / 2003)

    Without seeing the database, it is impossible to know whether it is a problem with your report (or with the database in general), or with your installation of Access / Excel.

Posting Permissions

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