string utils loadcsv index out of bounds error

Eduard

Active Member
Licensed User
Longtime User
B4X:
Sub Activity_Resume
   Dim x As StringUtils
   Dim serverantwoord As List
   Dim bestand As List
   bestand.Initialize
   bestand.Add("#00,543,5,5,-1")
   bestand.Add("#10,345=,435")
   File.WriteList(File.DirInternalCache,"bestand.csv",bestand)
   Dim serverantwoord As List
   Msgbox(File.ReadString(File.DirInternalCache,"bestand.csv"),"")
   Dim su As StringUtils
   serverantwoord=su.LoadCSV(File.DirInternalCache,"bestand.csv",",")
   Msgbox(serverantwoord.Size,"size")


It seems that Loadcsv can't read a file of more than one line (one line works, two or more doesn't work)

Any an idea whats wrong?
 

Eduard

Active Member
Licensed User
Longtime User
I think it must be a bug.

I have a work around. I use File.ReadList(dir,filename) to load the csv-lines and then split every line with

Dim fld() As String
fld=Regex.Split(",",line)
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…