I am trying to import comma separated numbers in a cell in excel. It looks like this on web:
000002678,000002737,000002827,000004326,000008528
But as soon as I import it in excel it transforms to following:
2,678,000,002,737,000,000,000,000,000,000,000,000,000
How can I maintain the format like it is on web and not treat it as one big number?
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://localhost:65076/TestData", Destination:=Range( _
"$A$1"))
.Name = "Test"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlAllTables
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With