Hi all,
I´m working on an app for gps based field data collection. A similiar program I made some years ago for a pda. I have to collect a record like this : 1;53.756932;11.802078;;Zauneidechse;Subadult;
By writeln in VB I get a text file like this:
1;53.756932;11.802078;;Zauneidechse;Subadult;
2;53.756917;11.802033;;Waldeidechse;Juvenil;
...
The file is opened just when the record is collected. After writing the file is closed. The next record is written with append to the file, without reading the complete file in.
Here I thought I´m on a good way:
By checking the CSV-file I found this output:
1;53.756932;11.802078;;Zauneidechse;Subadult;2;53.756917;11.802033;;Waldeidechse;Juvenil;3;53.756898;11.802057;;Zauneidechse;Weibchen;
Another way could be to read everytime the existing file into a list, adding the new line and write it back as list.
But this wouldn´t be very helpful, because the csv-file could become very big.
Is there a way to realize the file writing similiar like the oldscholl VB?
I checked a lot of threads, but no solution for this problem.
Any help is welcome
Regards,
Benedikt
I´m working on an app for gps based field data collection. A similiar program I made some years ago for a pda. I have to collect a record like this : 1;53.756932;11.802078;;Zauneidechse;Subadult;
By writeln in VB I get a text file like this:
1;53.756932;11.802078;;Zauneidechse;Subadult;
2;53.756917;11.802033;;Waldeidechse;Juvenil;
...
The file is opened just when the record is collected. After writing the file is closed. The next record is written with append to the file, without reading the complete file in.
Here I thought I´m on a good way:
B4X:
Dsent = Din1 & ";" & Din2 & ";" & Din3 & ";" & Din4 & ";" & Din5 & ";" & Din6 & ";" & Din7
tw1.Initialize(File.openoutput(File.DirRootExternal, "Mologfiles/MologACSV.csv", True))
'File.WriteList(File.DirRootExternal, "Mologfiles/MologACSV.csv", Dsent) 'True))
tw1.WriteLine(Dsent)
tw1.Close
By checking the CSV-file I found this output:
1;53.756932;11.802078;;Zauneidechse;Subadult;2;53.756917;11.802033;;Waldeidechse;Juvenil;3;53.756898;11.802057;;Zauneidechse;Weibchen;
Another way could be to read everytime the existing file into a list, adding the new line and write it back as list.
But this wouldn´t be very helpful, because the csv-file could become very big.
Is there a way to realize the file writing similiar like the oldscholl VB?
I checked a lot of threads, but no solution for this problem.
Any help is welcome
Regards,
Benedikt