Function Impo_allExcel() Dim myfile Dim mypath Dim myTableName mypath = "D:\我的文档\WeChat Files\mazhibin111\Files\" '把这里换成你的保存excel文件的目录,注意最后有一个反斜杠 myTableName = "NewTable" '把这里换成你在Access中想要新建的表格的名字 myfile = Dir(mypath) Do While myfile <> "" If myfile Like "*.xlsx" Then DoCmd.TransferSpreadsheet acImport, 8, myTableName, mypath & myfile, True End If myfile = Dir() Loop End Function