Importing More Than 65.535 rows to MS Access from Excel

旧城冷巷雨未停 提交于 2019-12-01 11:46:00

问题


I'm running the following code to import an entire sheet from excel to access, the sheet has 77k rows, but Access is importing only 65.535, any clur on how to fix it? Both Excel and Access are version 2013.

Function importa()

    Dim rs As DAO.Recordset
    Dim inicio As String
    Dim fim As String


 DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel12, _
    "NOMEBASE", Application.CurrentProject.Path() + "\Abre_Envio_Novo_Layout.xlsm", True, "Menu!BJ25:BM26"



    Set db = CurrentDb()
    Set rs = db.OpenRecordset("NOMEBASE")

    inicio = rs.Fields(2).Value
    fim = rs.Fields(3).Value



DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel12, _
    "BASE", Application.CurrentProject.Path() + "\Abre_Envio_Novo_Layout.xlsm", True, "Mailing_Recebido!A:AX"


    rs.Close

End Function

回答1:


acSpreadsheetTypeExcel12 should be acSpreadsheetTypeExcel12Xml for importing an Excel 2010 workbook.




回答2:


docmd.transfertext.........

please use this command in MS access if u wants to transfer more than 65536 rows in access



来源:https://stackoverflow.com/questions/26260815/importing-more-than-65-535-rows-to-ms-access-from-excel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!