Export query to excel with no 'Wrap Text'

billmark

Registered User.
Local time
Today, 02:11
Joined
Mar 28, 2012
Messages
25
Hi
I've created a simple code to export the query to excel. The exported excel spreadsheet always has wrap text. Please advise how to get rid of this format (wrap text) when exporting to excel by coding or somewhere in access I can modify.

QUOTE
Private Sub cmdAuditor_Click()
On Error GoTo cmdAuditor_Click_Err

DoCmd.OutputTo acOutputQuery, "qryAuditor", "ExcelWorkbook(*.xlsx)", "W:\Auditors.xlsx", True, "", , acExportQualityScreen


End Sub
UNQUOTE
 
I suggest you look at this thread where the forum member posted code that outputs to an excel file and then does a considerable amount of formatting on it after the export. I notice in one section of the code they were setting the word wrap of a range to false so maybe you can extract from this code what you need.
 

Users who are viewing this thread

Back
Top Bottom