Hi Norie,
I am importing the csv using VBA. The segments of code I have provided are actually part of a larger 'update the whole spreadsheet' macro.
Sheets("Import").Select
With ActiveSheet.QueryTables.Add(Connection:="TEXT;D:\My Folder\export.csv", Destination:=Worksheets("Import").Range("A1"))
.Name = "exportnew"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = False
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 1252
.TextFileStartRow = 2
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = False
.TextFileSemicolonDelimiter = True
.TextFileCommaDelimiter = True
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With
Which, again, I got from the record macro wizard.
Thank you for writing out some code for me - I will try and tweak it to my spreadsheet and see if it works.
Regards,
Josh.
Bookmarks