Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Left justify column title in query 2

Status
Not open for further replies.

bustersports

Programmer
Sep 25, 2002
92
US
I need to do an export to Excel. I have the data being left justified, however the column titles are centered. The titles must be left justified as well. Any idea on to what I need to do to make it happen? I am not able to find any way to do in thru formatting of the field. Have not found a way to do it in any threads I have searched here.

Thanks for your help.

 
Can't you do the formatting in excel ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
PHV,

Yes it could be done in Excel. But we are trying to automate the entire process. Let me briefly walk thru the process.

1. We import a spreadsheet.
2. Run the Access database, checking for various errors.
3. If correct, automatically assign a routing number.
4. Export that file to be FTPed to an external source handling payments.

The external source requires all fields be left justified, including titles.

Thanks
 
So, again, can't you do the formatting with excel automation in step 4 ?
Or export to a CSV file instead of a spreadsheet ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
You could write code, using the Excel object Model. But that requires a knowledge of Excel.

Actually it is quite simple to format a column in Excel 2007+.

1. Select the column(s) or cell(s)
2. Select the desired format

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Did you try DoCmd.OutputTo vs DoCmd.TransferSpreadsheet ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
SkipVought,

I was trying to avoid having the user open Excel and do the formatting. But that may be the only solution.

PHV,

Yes, the OutputTo is what I am using. Everything works fine but the column titles.

Thanks to both of you for your help.
 
And what about DoCmd.TransferSpreadsheet ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
PHV,

Thanks very much, the DoCmd.TransferSpreadsheet did the trick. Much appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top