Exporting data without headers?

Locopete99

Registered User.
Local time
Today, 06:07
Joined
Jul 11, 2016
Messages
163
Hi all,

I'm running a simple Transferspreadsheet code to export data to Excel.

Is there anyway to only export the data and not the field names?

Code:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12, "Qry_YTDCFY", "F:\NP Report DB.xlsm", "YTDCFY"
 
Thanks Sonic,

I had seen that but wondered if anyone had found a way to circumvent it.
 
I had seen that but wondered if anyone had found a way to circumvent it.
You can automate Excel and create the export file with Excel and copy the data from your query with VBA.
+ You've got full control over the process.
- It requires a multitude of effort.
 
oh i'm more then happy doing the work in excel, just was trying to see if there was any way to do it in Excel. Thanks though
 
To me its illogical to remove the headers in Excel though its easy enough to delete row 2 in Excel if you want.

Or just for laughs, export a query with field aliases and export that e.g.
Code:
SELECT tblRoomBookings.PersonID AS _, tblRoomBookings.PersonName AS __, tblRoomBookings.Roommate AS ___, tblRoomBookings.RoomID AS ____
FROM tblRoomBookings;

The spreadsheet will then have your aliases _,__,___,____ in row2
But why would you want to do so?
 

Users who are viewing this thread

Back
Top Bottom