1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| Sub Ecrire()
nom = "c:\fichier.txt"
Open (nom) For Output As #1
t1 = Chr(34) & Cells(1, 1).Value & Chr(34)
t2 = Chr(34) & Cells(1, 2).Value & Chr(34)
t3 = Chr(34) & Cells(1, 3).Value & Chr(34)
t4 = Chr(34) & Cells(1, 4).Value & Chr(34)
Print #1, t1, t2, t3, t4
Close #1
End Sub
Sub Lire()
nom = "c:\fichier.txt"
Open (nom) For Input As #1
Input #1, d1, d2, d3, d4
Cells(1, 1).Formula = d1
Cells(1, 2).Formula = d2
Cells(1, 3).Formula = d3
Cells(1, 4).Formula = d4
Close #1 |
Partager