访问 VBA 以将 Table 另存为电子表格
Access VBA To Save Table As Spreadsheet
我正在使用此语法将 table 导出到 .xlsx 文件。我遇到的问题是,每当我尝试打开文件时,都会抛出此错误:
Excel cannot open the file because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file.
我正在使用 Excel 2013 和 Access 2013 - 这是我使用的导出行
DoCmd.TransferSpreadsheet transfertype:=acExport, spreadsheettype:=acSpreadsheetTypeExcel12, TableName:=strTable, filename:=strWorksheetPath, hasfieldnames:=True
如何将访问权限 table 导出到 excel 以便您可以无错误地打开文件?
尝试:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12Xml, strTable, strWorksheetPath, True
我正在使用此语法将 table 导出到 .xlsx 文件。我遇到的问题是,每当我尝试打开文件时,都会抛出此错误:
Excel cannot open the file because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file.
我正在使用 Excel 2013 和 Access 2013 - 这是我使用的导出行
DoCmd.TransferSpreadsheet transfertype:=acExport, spreadsheettype:=acSpreadsheetTypeExcel12, TableName:=strTable, filename:=strWorksheetPath, hasfieldnames:=True
如何将访问权限 table 导出到 excel 以便您可以无错误地打开文件?
尝试:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12Xml, strTable, strWorksheetPath, True