Hello
I have try to put a string array into a list and save it to a csv file
I get this error
I see that its saying I am trying to cast an array into variable
however, If print the list1 it appears correct to me...
clearly I have missed something obvious
I have try to put a string array into a list and save it to a csv file
B4X:
Dim myRegexSolution As String = $"\s+(?=(?:[^"]*"[^"]*")*[^"]*$)"$ ' splits at spaces outside quotes
Dim SplitValues() As String = Regex.split(myRegexSolution,myHtmlResponse)
Dim list1 As List
list1.Initialize
For Each item As String In SplitValues
list1.Add(item)
Next
StringUtils1.SaveCSV(File.DirRootExternal & "/TestSP/", "Result.CSV", ",", list1)
I get this error
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.String[]
I see that its saying I am trying to cast an array into variable
however, If print the list1 it appears correct to me...
clearly I have missed something obvious