I have this saved .txt file in my app where it will record down the datas when I click save. However, the .txt file shows it in an arrangement like this:
0
1
2
3
I would like it to be like this:
0 1 2 3
It would be better if I can add in coma in between as well. How do I arrange it that way?
Sub Save_click
Dim str As String = "0,1,2,3"
Dim writer As TextWriter
writer.Initialize(File.OpenOutput(File.DirApp,"data.txt",True))
writer.WriteLine(str)
writer.Close
End Sub
and if you want to save the content from views then like this
B4X:
Sub Save_click
Dim str As String = Edittext1.text & "," & Edittext2.text & "," & Lat.Text" & "," & Lon.Text & "," & Time.Text
Dim writer As TextWriter
writer.Initialize(File.OpenOutput(File.DirApp,"data.txt",True))
writer.WriteLine(str)
writer.Close
End Sub
NOTE that i wrote "TRUE" in the Append argument since you want to attach another line to the text file and not rewrite the textfile
to get values from that file i will need to split the list item correct?
i cannot handle it like an excel file where i have rows and columns?
is there a way to save everything to a csv file and load it to a table that is not a VIEW so i can handle like an excel table (columns, rows)? (except of sql)
i guess a 2d array is not a solution here since i need to add new rows to it (like in a table)
but anyway i think it is better to open a new thread for this question