Hi,
folgender Code funktioniert für alle anderen txt-Ausleistungen wunderbar: (--> bei denen ist jedoch überall ein Trennstrich " | " vorhanden )
Dim Fileend As String
Fileend = "\Tabellen\TXT-Abzüge vom SAP hier abspeichern\TEST.txt"
Workbooks.add
With ActiveSheet.QueryTables.add(Connection:= _
"TEXT;" & Path & Fileend _
, Destination:=Range("$A$1"))
.Name = "DD09L"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 28592
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = False
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = False
.TextFileOtherDelimiter = "|"
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With
ActiveWorkbook.SaveAs Filename:=Path & "\Tabellen\Automatisch erstellte Exceldateien\TEST.xlsx"
Irgendjem. eine Idee?
VG
|