Revision: 39550
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at January 18, 2011 06:22 by gritter55
Initial Code
Set shtTmp = Sheets("tmp") shtTmp.Visible = True shtTmp.Select With ActiveSheet.QueryTables.Add(Connection:= _ "TEXT;" & Sheets("index").Range("F" & path_loc), _ Destination:=Range("A1")) .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .RefreshStyle = xlInsertDeleteCells .SavePassword = False .SaveData = True .AdjustColumnWidth = True .RefreshPeriod = 0 .TextFilePromptOnRefresh = False '.TextFilePlatform = 437 .TextFileStartRow = 1 .TextFileParseType = xlDelimited .TextFileTextQualifier = xlTextQualifierDoubleQuote .TextFileConsecutiveDelimiter = False .TextFileTabDelimiter = True .TextFileSemicolonDelimiter = False .TextFileCommaDelimiter = False .TextFileSpaceDelimiter = False .TextFileColumnDataTypes = Array(1) '.TextFileTrailingMinusNumbers = True .Refresh BackgroundQuery:=False End With DoEvents 'clear tmp sheet shtTmp.Select Cells.Select Application.CutCopyMode = False Selection.Clear Selection.QueryTable.Delete shtTmp.Visible = False Set shtTmp = Nothing
Initial URL
Initial Description
Initial Title
Excel - import a text file
Initial Tags
excel
Initial Language
Visual Basic