Sub Ecrire()
Dim i, j, DernièreLigne, DernièreColonne, f As Worksheet
Set f = ActiveSheet
With Sheets("Feuil1")
DerniereLigne = .Range("A1").SpecialCells(xlCellTypeLastCell).Row
DerniereColonne = .Range("A1").SpecialCells(xlCellTypeLastCell).Column
End With
chemin = "G:\xxxxxx\xxxxxx\"
Open chemin & "Report.txt" For Output As #1
For i = 1 To DerniereLigne
For j = 1 To DerniereColonne - 1
Print #1, f.Cells(i, j).Formula;
Next j
Print #1, f.Cells(i, j + 1).Value
Next i
Close #1
'commande ouverture notepad
Shell "C:\Windows\System32\notepad.exe " & chemin & "Report.txt"
End Sub