Tags: access, acexport, builds, database, docmd, excel, export, exports, header, microsoft, multiple, mysql, oracle, sheets, spread, sql, strtablename, template, transferspreadsheet

Access Export to Excel Header Problem ..

On Database » Microsoft Access

1,199 words with 2 Comments; publish: Wed, 28 Nov 2007 02:21:00 GMT; (250187.50, « »)

I have an access db that builds and exports multiple spread sheets to a template.

DoCmd.TransferSpreadsheet acExport, 8, strtablename, "\\templates\output\" & strfilename, True, "TransactionInformation!b4:I4"

The True/False is supposed to designate whether to use headers, but in regardless of choice, the headers from the table exported is placed into the spread sheet.

Is there a way around it so that only the data, no headers, are exported to the spreadsheet?

(my co-worker found on msdn that the headers will always be exported, regardless of true/false... figures)

All Comments

Leave a comment...

  • 2 Comments
    • I was just dinking around with a macro doing the TransferSpreadsheet action and sure enough whether you put Yes or No in the Field Names, they get transferred.

      However, when I did the TransferText action and chose No to Field Names, they did not transfer. When you choose csv as the file extension, it is considered an Excel file.

      I don't know if this will be structured enough for what you need, seeing as you specified the transfer range, but thought I would throw it out there for you to consider.

      #1; Tue, 11 Dec 2007 19:21:00 GMT
    • Good thought ... but I need to transfer to the specific ranges...
      #2; Tue, 11 Dec 2007 19:22:00 GMT