I have this code inside VBA to include .txt file
Sub Import_Text()
Sheets("WS ABCD").Select
Range("A1").Select
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;D:\DATA NOSTRO\OTOMASI REKON 2023\2. FEBRUARY 2023\17\DATA\7. CITI ABC 170223.txt" _ '---- I Want Change This Code with set Variable On Uipath
, Destination:=Range("$A$1"))
.Name = "7. CITI ABC 170223"
.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 = True
.TextFileTabDelimiter = False
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = True
.TextFileColumnDataTypes = Array(9, 1, 1)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With
End Sub
Variable On UiPath = GetFile
What should I do?