Writing Data to CSV File

Bachrock

Member
Licensed User
Longtime User
Hi,

I would like to write data to a CSV File. For Example "1,ABC123,500,Test,50"

Any good examples on how I could write that line of Data to the very end or bottom of a CSV File?

Also I would like to go to the bottom or End Of File to place this data as an append to the data already residing in the file.

Thanks,

Paul
 

Mahares

Expert
Licensed User
Longtime User
OK, Paul, here is a small example:
B4X:
Dim MyTextWriter As TextWriter
'Line below assumes text file located in rootexternal. It will be created if not exist
MyTextWriter.Initialize(File.OpenOutput(File.DirRootExternal, "bashrock.csv",True))
MyTextWriter.WriteLine("1,ABC123,500,Test,50")
MyTextWriter.Close
 
Upvote 0
Top