Results 1 to 5 of 5
  1. #1
    Thompyt is offline Expert
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2014
    Location
    El Paso, TX
    Posts
    839

    Excel Format

    How can I get access to output my reports in an XLSX vs an XLS format?



    DoCmd.OutputTo 3, "Report_Name", acFormatXLS, "C:\Temp\Report_Output_Name - " & Format(Date, "dd mmm yyyy") & ".xls", , 0

    I have tried
    acFormatXLSX and & ".xlsx", , 0

    DoCmd.OutputTo acOutputReport, "Report_Name", acFormatXLSX, "C:\Temp\Report_Output_Name.xlsx", True

    I get - Runtime error '2282': "The format in which you are attempting to output the current object is not available."

    I don't want an Excel 95 workbook.

    Thanks

  2. #2
    CJ_London is online now VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,424
    not sure you can output a report to excel as indicated by the error message - potentially too many formatting issues. As an experiment, try outputting to a .pdf instead. Also try outputting a table to excel - if both work then think exporting a report to excel is a no no.

  3. #3
    Thompyt is offline Expert
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2014
    Location
    El Paso, TX
    Posts
    839
    Ajax - I don't have any issues with .pdf. Just the excel. It is outputted in the WIN95 version when using .xls and is not saveable by the recipient after they make changes on thier systems. .xlsx does work.

  4. #4
    Micron is online now Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,800
    This may not be your issue, but it indicates you can (or at least, could) output a report to Excel

    https://support.microsoft.com/en-gb/kb/934833

  5. #5
    cyanidem's Avatar
    cyanidem is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Nov 2015
    Location
    Consett, UK
    Posts
    270
    Instead of:
    acFormatXLSX
    try:
    acSpreadsheetTypeExcel12XML
    or simply:
    10
    Those both should export to .xlsx format (Excel 2010)

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Export to Excel and format
    By aytee111 in forum Programming
    Replies: 7
    Last Post: 01-27-2014, 05:40 PM
  2. Export to Excel in Transpose Format
    By abdulnaseer in forum Import/Export Data
    Replies: 1
    Last Post: 01-30-2013, 02:18 PM
  3. Replies: 4
    Last Post: 12-17-2012, 01:21 PM
  4. Export to Excel, format and e-mail
    By NISMOJim in forum Programming
    Replies: 16
    Last Post: 08-18-2012, 12:13 AM
  5. Format Excel through VBA
    By jgelpi16 in forum Programming
    Replies: 2
    Last Post: 04-12-2011, 12:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums