i want to convert an excel sheet to notepad as you can see below ,my only missing conversion is to extract the numbers on a specific row with ("0.000") 3 decimals :
Private Sub CommandButton1_Click()
Dim filename As String
Dim linetext As String
Dim my_range As Range
filename = ThisWorkbook.Path & "\APCS ligne" & ".txt"
Open filename For Output As #1
Set my_range = Worksheets("APCS ligne").Range("A1:P500")
For i = Range("W1") To Range("U1")
For j = Range("W1") To Range("V1")
linetext = IIf(j = 1, "", linetext & "|") & my_range.Cells(i, j)
Next j
Print #1, linetext
Next i
Close #1
MsgBox ("data transfer done !")
End Sub
thanx in advance
Bookmarks