1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
Sub CSV()
'
' Nommer
'
sNomParcellaire = Sheets("Parcellaire").Range("O1").Value & "_" & Sheets("Parcellaire").Range("B1").Value & "_" & Sheets("Parcellaire").Range("B2").Value
sNomParcellaire = Replace(sNomPDF, "/", "")
sNomCultDiv = Sheets("Culture Diversifiée").Range("J1").Value & "_" & Sheets("Culture Diversifiée").Range("B1").Value & "_" & Sheets("Culture Diversifiée").Range("B2").Value
sNomCultDiv = Replace(sNomCultDiv, "/", "")
sNomProAnimale = Sheets("Production animale").Range("U1").Value & "_" & Sheets("Production animale").Range("B1").Value & "_" & Sheets("Production animale").Range("B2").Value
sNomProAnimale = Replace(sNomProAnimale, "/", "")
sNomAutres = Sheets("Autres produits").Range("G1").Value & "_" & Sheets("Autres produits").Range("B1").Value & "_" & Sheets("Autres produits").Range("B2").Value
sNomAutres = Replace(sNomAutres, "/", "")
' convertir en csv
Sheets("Parcellaire").Select
ChDir _
ThisWorkbook.Path
ActiveWorkbook.SaveAs Filename:= _
ThisWorkbook.Path & "\" & sNomParcellaire & ".csv"
, FileFormat:=xlCSV, CreateBackup:=False
Sheets("Culture diversifiée").Select
ActiveWorkbook.SaveAs Filename:= _
ThisWorkbook.Path & "\" & sNomCultDiv & ".csv" _
, FileFormat:=xlCSV, CreateBackup:=False
Sheets("Production animale").Select
ActiveWorkbook.SaveAs Filename:= _
ThisWorkbook.Path & "\" & sNomProAnimale & ".csv" _
, FileFormat:=xlCSV, CreateBackup:=False
Sheets("Autres produits").Select
ActiveWorkbook.SaveAs Filename:= _
ThisWorkbook.Path & "\" & sNomAutres & ".csv" _
, FileFormat:=xlCSV, CreateBackup:=False
' Fermer le csv
ActiveWorkbook.Close
End Sub |
Partager