Solved

Access 2007 Report Export to Excel

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

Expert Comment

by:Rey Obrero (Capricorn1)
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 120

Expert Comment

by:Rey Obrero (Capricorn1)
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

770 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