1;0,001;0;0;150
2;0,002;2,5;1,75;150,00666
3;0,003;5;3,5;150,01665
4;0,004;7,5;5,25;150,02997
5;0,005;10;7;150,04662
6;0,006;12,5;8,75;150,0666
7;0,007;15;10,5;150,08991
8;0,008;17,5;12,25;150,11655
9;0,009;20;14;150,14652
10;0,01;22,5;15,75;150,17982
11;0,011;25;17,5;150,21645
12;0,012;27,5;19,25;150,25641
13;0,013;30;21;150,2997
14;0,014;32,5;22,75;150,34632
15;0,015;35;24,5;150,39627
16;0,016;37,5;26,25;150,44955
17;0,017;40;28;150,50616
18;0,018;42,5;29,75;150,5661
19;0,019;45;31,5;150,62937
20;0,02;47,5;33,25;150,69597
21;0,021;50;35;150,7659
22;0,022;52,5;36,75;150,83916
23;0,023;55;38,5;150,91575
24;0,024;57,5;40,25;150,99567
Voilà mon fichier CSV il s'agit donc de la dernière donnée.
J'importe ce fichier à l'aide d'une macro :
Sub Charger_Fichier_CSV()
Application.Calculation = xlCalculationManual ' Désactive le calcul automatique
SupprimerDiagrammes_donnée 'Lance le sous programme pour effacer la feuille
Dim Ar() As String
Nom_Chemin = ThisWorkbook.Path
ChDrive (Left(Nom_Chemin, 1))
ChDir (Nom_Chemin)
Application.DefaultFilePath = Nom_Chemin
Nom_Fichier_CSV = Application.GetOpenFilename("Fichier CSV (*.csv), *.csv", , "Charger fichier")
Sheets("Données").Select
If Nom_Fichier_CSV <> False Then
Application.ScreenUpdating = False 'Desactive la mise a jour de la feuille en dynamique
NumFichier = FreeFile
iRow = 2
Open Nom_Fichier_CSV For Input As #NumFichier
Line Input #NumFichier, Chaine
While Not EOF(NumFichier)
Line Input #NumFichier, Chaine
Chaine = Replace(Chaine, """", "")
Ar = Split(Chaine, ";")
Cells(iRow, 1) = Ar(0) ' Enregistre Numéro point en Colonne A
Cells(iRow, 2) = Ar(1) ' Enregistre temps en colonne B
Cells(iRow, 3) = Ar(2) ' Enregistre Effort capteur en colonne C
Cells(iRow, 4) = Ar(3) ' Enregistre Effort moteur en colonne D
Cells(iRow, 5) = Ar(4) ' Enregistre Position en colonne E
iRow = iRow + 1
Wend