Export a report into ms excel (1 Viewer)

aftab1965

Registered User.
Local time
Today, 09:40
Joined
Jan 12, 2016
Messages
48
Hi Friends

I am new in MS Access, I created a database and want to export my reports in MS Excel Format, but MS Access 2007 is providing xml, rich text document,html and xps format, MS Excel is not listed here, kindly help me
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 00:40
Joined
Feb 28, 2001
Messages
27,194
To export a report to Excel, you must have a reference to the Excel library. Get to a code window via the "Database Tools > Code Window" click sequence, then on the menu bar, click on Tools > References. Verify that the MS Office Excel library objects are checked.
 

aftab1965

Registered User.
Local time
Today, 09:40
Joined
Jan 12, 2016
Messages
48
sorry sir,
it doesnot work for me,
is there any other easy way to export reports into EXCEL
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 13:40
Joined
May 7, 2009
Messages
19,247
on immediate window you can run docmd.outputTo:

docmd.OutputTo acOutputReport,"your_report_name",acformatxls,"outputfile.xls",true
 

aftab1965

Registered User.
Local time
Today, 09:40
Joined
Jan 12, 2016
Messages
48
Thank dear sir arnelgp, but Sir I am new in access. plz explain your answer in detail, i.e Where should I write this command :
docmd.OutputTo acOutputReport,"your_report_name",acformatxls,"out putfile.xls",true
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 00:40
Joined
Feb 28, 2001
Messages
27,194
As a test of whether you can do this, you bring up a code window. Any code window in Access will work, but starting from the ribbon, the easiest way to get there is to select "Database Tools" then click the "Visual Basic" icon. The menu bar has the normal things on it like File, Edit, View, etc. Click View and from the drop-down, select "Immediate Window." That is where you would do as arnelgp suggested.

If arnelgp's suggested test does not work, then something is wrong with your installation. Either EXCEL was not fully installed or Access was not fully installed, one or the other. (Or there was a failure of some sort during the installation.)
 

Users who are viewing this thread

Top Bottom