Results 1 to 3 of 3
  1. #1
    Bospeentje is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2014
    Posts
    15

    export to Excel - transponing the row to a column


    Anyone here can help me programming a button with a specific peace of VB code?
    The button must export a form (or query output) with only one record (row of data) to Excel. This row however needs to be transponed in Excel to a column instead of a row.

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    I would probably opt for Automation of Excel and look for a way to do a special paste or something. Either way, It seems you will need to use a For Each In Next or a For Next statement to loop through the field names of a DAO recordset. Maybe use a temp table in Access and export the temp table or Automate Excel and place the data in each cell.

    EDIT: Another approach would be to use a UNION query instead of a temp table.

  3. #3
    Bospeentje is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2014
    Posts
    15
    Tnx, helpfull enough

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

Similar Threads

  1. Replies: 12
    Last Post: 10-08-2014, 02:35 PM
  2. Export Queries to Excel with Combo-Box visible in Excel
    By johnmarc2 in forum Import/Export Data
    Replies: 1
    Last Post: 07-07-2014, 05:33 PM
  3. Replies: 2
    Last Post: 10-20-2013, 02:11 PM
  4. Replies: 7
    Last Post: 04-25-2013, 03:47 PM
  5. Replies: 3
    Last Post: 10-07-2011, 07:49 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