amit_excelVBA
New Member
- Joined
- Apr 11, 2019
- Messages
- 4
Hi, I am using below code to export table from access 2016 to excel but getting error saying:
Run time error 31532: Microsoft Access cannot export the data
Public Function ExportToexcel_DD()
Dim output_fl As String
stName = "\PRO"
output_fl = CurrentProject.Path & stName & "_DROPS.xlsx"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12Xml, TableName:="Dps_Arprts", FileName:=output_fl, Hasfieldnames:=True, Range:="Arpts"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12Xml, "Dps_Rnws", output_fl, True, "Rnws"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12, "Dps_Obs", output_fl, True, "Obs"
End Function
Please help
Thanks in Advance.
Run time error 31532: Microsoft Access cannot export the data
Public Function ExportToexcel_DD()
Dim output_fl As String
stName = "\PRO"
output_fl = CurrentProject.Path & stName & "_DROPS.xlsx"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12Xml, TableName:="Dps_Arprts", FileName:=output_fl, Hasfieldnames:=True, Range:="Arpts"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12Xml, "Dps_Rnws", output_fl, True, "Rnws"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12, "Dps_Obs", output_fl, True, "Obs"
End Function
Please help
Thanks in Advance.