Hello Everybody
I want to load a file for example csv file, that are into the directory Téléchargement and use it as if it had been supported by this sub.
It is possible ?
Thanks.
I want to load a file for example csv file, that are into the directory Téléchargement and use it as if it had been supported by this sub.
B4X:
Private Sub HandleLoadResult(Result As LoadResult)
If Result.Success Then
Try
Dim Reader As TextReader
Reader.Initialize(File.OpenInput(Result.Dir, Result.FileName))
' Dim line As String
line = Reader.ReadLine
' stringList.Add(line)
Do While line <> Null
line = Reader.ReadLine
stringList.Add(line)
increm = increm +1 ' nombre lignes dans le CSV
Loop
Reader.Close
' chainetexte = File.ReadString(Result.Dir, Result.FileName)
toast.Show($"File '${Result.RealName}' loaded"$)
Catch
chainetexte = "Error loading file"
'Log(LastException)
End Try
End If
' LoadGTR2
Log ("nbre lignes "&increm)
' txtField.Text = chainetexte
End Sub
It is possible ?
Thanks.