Hello,
I want to do row data processing with importing a CSV file that has 4 columns. I have this random error on the For Each loop and the Get "Out of bounds. Index=1347794462 Length=4". What is strange, I always have this error in Release mode and occasionally works in B4i-Bridge mode.
Thanks for your help.
B4X:
Dim su As StringUtils
Dim list As List
list.Initialize
list=su.LoadCSV(File.DirLibrary, "api.csv",";")
list.RemoveAt(0)
For Each tempMap As Map In list
libmajparametre = tempMap.Get(0)
rqanaori = tempMap.Get(1)
refqual = tempMap.Get(2)
limitequal = tempMap.Get(3)
For Each tempMap As Map In list
if tempMap.size > 0 then libmajparametre = tempMap.Get(0)
if tempMap.size > 1 then rqanaori = tempMap.Get(1)
if tempMap.size > 2 then refqual = tempMap.Get(2)
if tempMap.size > 3 then limitequal = tempMap.Get(3)
Thank you for this idea but I have the same error on the first get "If tempMap.size > 0 Then libmajparametre = tempMap.Get(0)".
Is this a problem with the use of Map?
Hi everyone. I'm saving dates and temperatures into a CSV-file, which works perfectly. (Format: 12.08.2018, 25.5) Now I'm trying to call my data (line by line, I want to add the data to a graph). In the end, I need a String for the date and a float for the temperature. It only returns stuff like...
Dim su As StringUtils
Dim list As List
list.Initialize
list=su.LoadCSV(File.DirLibrary, "api.csv",";")
list.RemoveAt(0)
Dim row() As String
For i=0 To list.Size-1
row = list.Get(i)
libmajparametre = row(0)
rqanaori = row(1)
refqual = row(2)
limitequal = row(3)