DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel12, _
"TEMP", "C:\Users\" & username & "\Desktop\" & iName, True
I am exporting/appending a table via the above code.
The problem is, whenever I do the appending via manual way (by going through the Access Wizard) it appends fine.
However, whenever I try to append it via the above code, it gives 'Type Conversion' Error on a certain column (column H)
This column H is definted as 'Text' on the database
Also in the excel file, defined as text (and I tried to re-define it via the following vba code)
Selection.NumberFormat = "@"
Selection.TextToColumns Destination:=Range("H1"), DataType:=xlFixedWidth, _
FieldInfo:=Array(0, 2), TrailingMinusNumbers:=True
^ Regardless of what I do, when I do the appending manually, it imports fine. When I do it through code, it gives a list of import errors on column H.
Any help is much appreciated!