Sub Demo1()
ChDrive ThisWorkbook.Path: ChDir ThisWorkbook.Path
CSV = Application.GetOpenFilename("Fichiers csv ,*.csv", , _
" Sélection des fichiers de mesures :", , True)
If Not IsArray(CSV) Then Exit Sub
D$ = Left$(CSV(1), InStrRev(CSV(1), "\"))
ReDim VA(UBound(CSV), 27)
Me.UsedRange.Clear
With CreateObject("ADODB.Stream")
.Charset = "UTF-8"
For N% = 1 To UBound(CSV)
.Open
.LoadFromFile CSV(N)
SPQ = Split(.ReadText, vbCrLf)
.Close
If UBound(SPQ) > 30 Then
VA(N, 0) = Split(Replace(CSV(N), D, ""), ".")(0)
For R% = 5 To 31
SP = Split(SPQ(R), ",")
If N = 1 Then VA(0, R - 4) = SP(0)
VA(N, R - 4) = SP(1)
Next
End If
Next
End With
With Cells(1).Resize(UBound(VA) + 1, 28)
.Value = VA
.Columns.AutoFit
End With
End Sub