Sub test()
Dim myFso As Object, csvFile As Object, textLine As String
Dim exportFileName As String
Dim curCell As Range
Dim i As Integer
exportFileName = "C:\test.txt"
' créer le fichier
Set myFso = CreateObject("Scripting.FileSystemObject")
Set csvFile = myFso.CreateTextFile(Filename:=exportFileName, overwrite:=True)
Set curCell = ThisWorkbook.Sheets("MASTER").Range("A1")
With ThisWorkbook.Sheets("MASTER")
For i = 1 To .Range("A" & .Rows.Count).End(xlUp).Row
Set curCell = .Range("A" & i)
textLine = vbNullString
While curCell.Text <> vbNullString
textLine = textLine & IIf(textLine = vbNullString, vbNullString, vbTab) & curCell.Text
Set curCell = curCell.Offset(0, 1)
Wend
' Set curCell = .Range("A" & curCell.Row + 1)
' écrire la ligne dans le fichier
csvFile.WriteLine textLine
Next i
End With
' fermer le fichier
csvFile.Close
Set csvFile = Nothing: Set myFso = Nothing
End Sub