I\'m running a Macro on Excel to import multiple .txt files and with a filter set to the filename, so it acts like a wildcard. Every file has the same layout, it\'s Semicolo
I haven't tested but it seems like replacing :
Sub Importar_PORT(iFullFilePath As String, iFileNameWithoutExtension)
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;" & iFullFilePath, _
Destination:=Range("$A$1"))
with :
Sub Importar_PORT(iFullFilePath As String, iFileNameWithoutExtension)
afterLast = Cells(Rows.Count, 1).End(xlUp).Row + 1
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;" & iFullFilePath, _
Destination:=Range("$A$" & afterLast))
would work fine.