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
| Sub Lissage()
Dim Nv, P1, P2, P3 As Variant
Dim X(10000000), Y(10000000), Z(10000000) As Variant
Open ActiveWorkbook.Sheets("bathy").Cells(7, 6) For Input As #1 ' Fichier bathy Brut
'Mise en tableau dynamique des bathy
i = 0
Do While Not EOF(1)
i = i + 1
Input #1, P1, P2, P3 ' lecture fichier
X(i) = P1
Y(i) = P2
Z(i) = P3
Loop
Close #1
Nv = i
Close #1
i = 0
Open ActiveWorkbook.Sheets("bathy").Cells(7, 6) For Output As #2
For i = 1 To Nv
Print #2, X(i), Y(i), -Z(i)
Next i
Close #2
End Sub |
Partager