Exporting Access tables/queries to Excell in a predefined format

abdbuet

New member
Local time
Today, 08:17
Joined
Jun 14, 2006
Messages
4
I have an Access database. Now I want to export the data of a table in the database to excel sheet in pre-defined format. e.g. i want that in the first row of the excel file, there is a heading called "Report". In the second row, there should be column header like "Name", "Age", "Gender". Also there must be 1 column gap between this header. Then in the following rows, there should be data.
 
i want that in the first row of the excel file, there is a heading called "Report". In the second row, there should be column header like "Name", "Age", "Gender". Also there must be 1 column gap between this header. Then in the following rows, there should be data.
It doesn't sound like you have that much formatting to do. You could probably format these two lines the way you want and then import your information from your Access object on a specific cell or cell range.

Data>Import External>Import...
 
Sorry I am not clear in my prev post. I want this done by a command button in Access. So I need VBA code so that when I click on the button, It will

1) Read an existing excel file
2) Put some values in some certain cell
3) Then Save the excel file in a different name (like save as).
 

Users who are viewing this thread

Back
Top Bottom