Sub TXT()
Dim tablo, t, rest(), p As Integer, n As Long, trans()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
With Workbooks.Open(ThisWorkbook.Path & "\Fichier txt.txt").Sheets(1)
tablo = .Range("A1", .Cells(.Rows.Count, 1).End(xlUp)(2))
For Each t In tablo
ReDim Preserve rest(n)
p = InStr(t, "=")
If p And p < Len(t) Then
rest(n) = Left(t, p)
n = n + 1
ReDim Preserve rest(n)
rest(n) = Mid(t, p + 1)
Else
rest(n) = t
End If
n = n + 1
Next
'---transposition---
ReDim trans(n - 1, 0)
For n = 0 To n - 1
trans(n, 0) = rest(n)
Next
.[A1].Resize(n) = trans
.Parent.SaveAs .Parent.Path & "\" & .Parent.Name, xlText
.Parent.Close
End With
End Sub