Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
XLS EXPORT
Norman M 

11 years ago
When I export a spreadsheet it exports the header rows. I want the header rows omitted, I do not even want them to be the first row of the export with no headers,

Access
SKU PRICE
asd  $5
abs  $7

I want xls to be simply
asd  $5
abs  $7

let us call the db = DB
the export paths is = C\path\db.xls
using access 2003

This is as afr as I have got:

Function Testexport()
On Error GoTo Testexport_Err

    DoCmd.TransferSpreadsheet acExport, 8, "EXPORT CD SKU", "C\path\db.xls", False, ""


Testexport_Exit:
    Exit Function

Testexport_Err:
    MsgBox Error$
    Resume Testexport_Exit

End Function

I have seen this suggestion on the web:

I have seen code like this but beyond me to make this into one code (it has no path for the workbook) - I guess as using 97-2003 this will be acSpreadsheetTypeExcel11 :

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12, "tbl_one", xlfile, True

Dim xl As Object
Dim wb As Object

Set xl = CreateObject("Excel.Application")
Set wb = xl.Workbooks.Open(xlfile)

xl.DisplayAlerts = False
With wb.Worksheets(1)
    .Rows(1).Delete
End With
wb.Save
xl.Visible = True


Reply from Alex Hedley:

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12, "tbl_one", xlfile, True

You need to set "xlfile" to the path of your file.

expression .TransferSpreadsheet(TransferType, SpreadsheetType, TableName, FileName, HasFieldNames, Range, UseOA)
1. TransferType
2. SpreadsheetType
3. TableName
4. FileName
5. HasFieldNames
6. Range
7. UseOA

Or you could use TranferText.

I've got a written tutorial on Exporting Objects from a database, coming out soon.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/16/2026 6:31:05 PM. PLT: 1s