DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, _ strQDF,"C:\MyFolderName\MyFileName.xls" dbs.QueryDefs.Delete strQDF dbs.Close Set dbs = Nothing. Bin ich mit TransferSpreadsheet zu exportieren einer Abfrage aus access nach excel und es funktioniert gut. DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, "tblMileage", "C:\Practice\ExcelPractice\Practice2.xls", True "tblMileage" is the name of the query. 我有一個 MS Access 數據庫,其中包含許多存儲查詢和 Excel 電子表格的鏈接表。 我特別需要導出 個,我還需要創建備份。 在我嘗試自動化它時,我正在嘗試使用 VBA。 查詢名稱: 數據庫位於 Reports Run Data我希望第一個和第二個查詢都導出到 Reports Type 和 DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel8, "test", "C:\123.xls", True Used to work all the time. Er scheint die Daten an die Datei anzuhängen. DoCmd.TransferSpreadsheet acExport Microsoft Access : MS-Office-Forum > Microsoft Access & Datenbanken > Microsoft ... die *.xlsx* wird nicht immer gespeichert! DoCmd Remarks. Syntax DoCmd.TransferSpreadsheet ( TransferType, SpreadsheetType , TableName, FileName, HasFieldNames, Range, UseOA ) Key TransferType The type of transfer to make. DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, _ "Z_Reporting_Table", "C:\BPS_DataBase\BPS_Template.xls" When I step thru' the code, Access behaves as though the operation was succesfully. Instead you can update the arguments to export to a CSV or XLS file format instead (ex. DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel7, TblName, MeinPfad, -1, Bereich. t2. MS Access VBA 和宏導出 - 堆棧內存溢出 DoCmd.TransferSpreadsheet acExport - - - - - Office-Loesung.de