Convertir un fichier excel en csv avec tabulation

Fermé
soltaniismael Messages postés 1 Date d'inscription jeudi 18 décembre 2014 Statut Membre Dernière intervention 18 décembre 2014 - 18 déc. 2014 à 14:29
 Maurice - 18 déc. 2014 à 15:05
Bonjour à tous,

J'ai besoin de convertir mon fichier Excel en CSV et j'aimerais que mon délimiteur soit une tabulation (csv with tab as the delimiter). Quelqu'un peut-il me donner un coup de main s'il vous plait ?
A voir également:

1 réponse

Bonjour
Voila une macro csv en tabulation
a toi de modifier la Plage

Sub ExportVbtab()
Application.ScreenUpdating = False
'Nom = ActiveSheet.Name
Nom = "Test"
Ext = ".csv"
Fichier = Nom & Ext
Chemin = ActiveWorkbook.Path & Application.PathSeparator
CheminFiche = Chemin & Fichier
'Sep = ";"
Sep = vbTab
Nlig = Cells(Rows.Count, 1).End(xlUp).Row
   Set Plage = Range("A1:Y" & Nlig)
      Open CheminFiche For Output As #1
         For Each Lig In Plage.Rows
            Tmp = ""
               For Each Cel In Lig.Cells
                  Tmp = Tmp & CStr(Cel.Text) & Sep
               Next
            Print #1, Tmp
         Next
      Close
   Set Plage = Nothing
Application.ScreenUpdating = True
MsgBox "Terminer"
End Sub

A+
Maurice
0