1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
Sheets("LISTE").Activate
Dim x, y, DernièreLigne, DernièreColonne
Application.ScreenUpdating = False
ActiveSheet.Range("A1").Select
Selection.CurrentRegion.Select
Set tbl = ActiveCell.CurrentRegion
DernièreLigne = tbl.Rows.Count
DernièreColonne = tbl.Columns.Count
Cells(1, 1).Select
Open "Courbes0" + s5 + ".csv" For Output As #1
For x = 1 To DernièreLigne
For y = 1 To DernièreColonne - 1
If TypeName(Cells(x, y + 1).Value) = "Date" Then
Print #1, Format(Cells(x, y + 1).Formula, "dd/mm/yyyy hh:nn:ss") & ";";
Else
Print #1, Cells(x, y + 1).Formula & ";";
End If
'Print #1, Cells(x, y).Formula + ";";
Next y
Print #1, Cells(x, y + 1)
Next x
Close #1 |
Partager