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
acSpreadsheetTypeExcel12
should be acSpreadsheetTypeExcel12Xml
for importing an Excel 2010 workbook.
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