Affichage des articles dont le libellé est Trim a Column. Afficher tous les articles
Affichage des articles dont le libellé est Trim a Column. Afficher tous les articles

Trim a Column

mercredi 18 mars 2015

Hello.



I use the following module to import data from a spreadsheet.



Function ImportAutoCount()

MySheetPath = "R:\DEPT-BR\CONSUMER LENDING\CONSUMER LENDING DATABASES\CRYSTAL AND LOANSPQ REPORTS\AUTO COUNT.xls"

CreateObject ("Excel.Application")

Set XlBook = GetObject(MySheetPath)

DoCmd.TransferSpreadsheet acImport, 8, _

"tbl_MeridianLinkFile", "R:\DEPT-BR\CONSUMER LENDING\Consumer Lending Databases\Crystal and LoansPQ Reports\AUTO COUNT.xls", True, "Sheet1!A3:BV25000"

End Function



It works great. However, occassinally it will drop data and I have to go in and manually trim spaces in one particular column in order for the data to be imported.



Is there code that I could add to my VBA to automatically trim the column or range prior to importing the data? Thanks.

Trim a Column

Labels