I have VBA code in an Access DB that exports data as a CSV file. This code works great but I would like to export these as Excel files. When I use the docmd.sendobject..... the database crashes which is how I started using the .csv option. Can I tweak this code to export these as .xlsx? I run through a loop and pass several tables to the docmd.transfertext....
Do While intCtr < 4
strCSVFile = strSavePath & strTable(intCtr) & ".csv"
DoCmd.TransferText transfertype:=acExportDelim, _
tablename:=strTable(intCtr), _
FileName:=strCSVFile, _
hasfieldnames:=True
intCtr = intCtr + 1
Loop
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Most Valuable Expert award recognizes technology experts who passionately share their knowledge with the community, demonstrate the core values of this platform, and go the extra mile in all aspects of their contributions. This award is based off of nominations by EE users and experts. Multiple MVEs may be awarded each year.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.