Solved

Access 2007 Report Export to Excel

Posted on 2011-03-25
5
456 Views
Last Modified: 2012-08-13
I've developed a form in Access that does some data process and I have a button that runs a report and exports the report to Excel.

When I open the exported report in Excel, everything is fine, accept the column heights are very high.

Is there any way to reduce the height of the columns in the exported Excel file?

Note:  I've tried compressing the fields in the report so there is no space in the Detail section of the report.
0
Comment
Question by:tfewster500
  • 2
  • 2
5 Comments
 
LVL 119

Expert Comment

by:Rey Obrero
ID: 35219201
<Is there any way to reduce the height of the columns in the exported Excel file?>
yes, you can open the excel file in codes and set the rowheight accordingly

and normally, it is the record source of the report that are exported
0
 
LVL 31

Expert Comment

by:Helen_Feddema
ID: 35219960
To get precise control of column size, etc., you can create a new Excel workbook from a pre-formatted template, and then fill it with data from Access, moving cell by cell if needed for very complex formats, or using CopyFromRecordset to put the entire recordset into the sheet at a specified location..  Use the report's record source query or SQL for the export, not the report itself.
0
 
LVL 31

Expert Comment

by:Helen_Feddema
ID: 35219982
See my Access Archon #127 for an example of filling workbooks with data cell by cell.  Here is a link for downloading it:

http://www.helenfeddema.com/Files/accarch127.zip

Also see Access Archon #200 for an example of exporting a report's record source to a workbook (among other techniques).  Here is a link for downloading it:

http://www.helenfeddema.com/Files/accarch200.zip
0
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 500 total points
ID: 35222465
...in other words, this issue is best corrected in Excel....
0
 
LVL 119

Expert Comment

by:Rey Obrero
ID: 35515893
i wonder if you understood this statement

 <yes, you can open the excel file in codes and set the rowheight accordingly>

from my post at http:#a35219201
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now