Importing / exporting formats

Cowichandave

New Member
Joined
Jan 18, 2009
Messages
44
Office Version
  1. 2016
I am exporting the results of a query in Access to Excel using a macro to an existing file.

I would like the resulting excel file to have specific row sizes and column width and a specific background color.

This would be best if it could be accomplished with a single pushbutton action in Access which I have not figured out to set as a new user.

Alternatively is it possible for Excel to automatically handle an import and format the resulting table?
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Welcome to the Board!

Your best bet is to record a macro applying the format you want. If you need some help making it work with a dynamic range, just post the code you end up with and someone can tweak it for you.
 
Upvote 0
In Access 2007 macro recording is not available. I know I can create a macro in Excel to do this but I really would like this as a one step process in Access or can one set Excel so that whatever is exported to it is formatted automatically
 
Upvote 0
In Access 2007 macro recording is not available.

Not unless I'm missing something.

I know I can create a macro in Excel to do this but I really would like this as a one step process in Access or can one set Excel so that whatever is exported to it is formatted automatically

You might be better off posting this in the Access forum, but in my experience the two don't play well with eachother in terms of formatting.

And if you can get your formatting set up via code then it can be seamless to your end users anyway (hence automatic).
 
Upvote 0

Forum statistics

Threads
1,215,219
Messages
6,123,680
Members
449,116
Latest member
HypnoFant

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top