Results 1 to 3 of 3
  1. #1
    Xarkath is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2013
    Location
    Millcreek WA
    Posts
    92

    Exporting to Excel - Column Headers

    Hello,

    I have a report in Access that produces variable headers as the output is different from client to client. When exporting to PDF everything works great but when exporting to Excel these variable headers are exported with thier true names. Col8, Col9, Col10 etc. And our clients insist on Excel reports. Is there a way to get the assigned name to export to Excel? Assigned names would be something like Medical, Dental, Vision or whatever is applicable to the client and is assigned to the report through VBA code. BTW, the data for the report is pulled from a cross-tab query so exporting directly from the query has its own set of formatting issues and is the reason I am using a report with variable column headers.



    Thanks

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    you can export data to an excel file on a line by line basis (i.e. cycling through a crosstab query and exporting it line by line rather than trying to export the thing as a whole might work)

    http://www.homeandlearn.org/write_to_a_text_file.html

    it's exporting form an excel file to a text file but the same methodology would apply to exporting from access. (you can get query column counts and row counts for instance)

  3. #3
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    oh, one other thing you could try... append the crosstab query to a temporary table, then export the contents of the temporary table. I am not a proponent of using temp tables but exporting crosstabs is one of the times where it's expedient.

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

Similar Threads

  1. Replies: 10
    Last Post: 01-07-2014, 04:03 PM
  2. column report with headers along the side
    By ssalem in forum Reports
    Replies: 2
    Last Post: 06-20-2013, 02:22 PM
  3. Replies: 2
    Last Post: 03-16-2012, 06:49 AM
  4. Dynamic Column Headers but NOT CROSSTAB
    By jtkjames in forum Queries
    Replies: 1
    Last Post: 07-26-2010, 05:16 AM
  5. Access Report w/o Column Headers
    By stattech in forum Reports
    Replies: 8
    Last Post: 06-10-2010, 02:07 AM

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