你可以先导出文件然后调用EXCEL程序对EXCEL进行操作任何保存即可,以下程序仅供参考
Function TEMS_ExcelToCel(DataPath As String, Path As String)
'将导出的TEMS文件EXCEL格式转换为cel文本格式文件
'DataPath 文件路径全称
'Path 文件路径,含"\"
Dim ExcelObj As Object 'Excel.Application
Dim 工作簿 As Object 'Excel.Workbook
DoCmd.SetWarnings False
'DoCmd.Hourglass True
Set ExcelObj = CreateObject("Excel.Application")
Set 工作簿 = ExcelObj.Workbooks.Open(DataPath)
ExcelObj.Worksheets(1).Select
ExcelObj.Rows("1:1").Select
ExcelObj.Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
ExcelObj.Cells(1, 1) = "992 TEMS_-_Cell_names"
工作簿.SaveAs Path & "TEMS" & ".cel", FileFormat:=xlText, ReadOnlyRecommended:=False, CreateBackup:=False
ExcelObj.Workbooks("TEMS" & ".cel").Close (True)
Kill DataPath '删除原EXCEL文件
ExcelObj.Quit '退出Excel程序
DoCmd.SetWarnings True
End Function
作者: jonical 时间: 2014-6-5 08:59
'DoCmd.RunSQL "select top 65535 * into [Excel 8.0;database=" & Path & ".xls].[" & TableName & "] from " & TableName '导出2003格式 可以用这种语句导出文件