Solved

Access 2007 Report Export to Excel

Posted on 2011-03-25
5
455 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

707 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

15 Experts available now in Live!

Get 1:1 Help Now