Hello, i try to export with your Stringutil Code and then wants to start excel to read the csv file.
The debugger shows size of List1 = 40 so i have 40 Lines to inserted.
But the debugger then stops at the next line when it wants to CREATE the file:
FileNotFoundException
java.io.FileNotFoundException: /storage/emulated/0/Android/data/b4a.MyFirstProgram/files/Test.csv: open failed: ENOENT (No such file or directory)
Of course there should no such file....it should create it. Or is my thinking about it wrong?
Any hint would be great
The debugger shows size of List1 = 40 so i have 40 Lines to inserted.
But the debugger then stops at the next line when it wants to CREATE the file:
FileNotFoundException
java.io.FileNotFoundException: /storage/emulated/0/Android/data/b4a.MyFirstProgram/files/Test.csv: open failed: ENOENT (No such file or directory)
Of course there should no such file....it should create it. Or is my thinking about it wrong?
Any hint would be great
B4X:
Dim su As StringUtils
Dim Cursor1 As Cursor
Cursor1 = Main.SQL1.ExecQuery("SELECT Nummer, Jobname, Titel FROM jobevents")
Dim list1 As List
list1.Initialize
Dim cols() As String
For i = 0 To Cursor1.RowCount - 1
Cursor1.Position = i
cols = Array As String(Cursor1.GetString2(0), Cursor1.GetString2(1), Cursor1.GetString2(2))
list1.Add(cols)
Next
Cursor1.Close
Log(list1.Size)
su.SaveCSV(File.DirDefaultExternal, "Test.csv", ",", list1)
Dim k As Intent
k.Initialize(k.ACTION_VIEW, "file://" & File.DirDefaultExternal & "/Test.csv")
k.SetType("application/csv")
StartActivity(i)