Johnmcenroy Active Member Licensed User Longtime User May 27, 2013 #1 I have a CSV file with UTF8 encoding. Separator is ",". I have 3 strings in that file. The following code: Code: Copy AppBrainRes = su.LoadCSV (File.DirInternal,"AppBrainCSV",",") For i=0 To AppBrainRes.Size -1 Log (AppBrainRes.Get(i)) Next In log windows I have 3 lines: [Ljava.lang.String;@2bc5dbc0 [Ljava.lang.String;@2bc5dc98 [Ljava.lang.String;@2bc5dd40 CSV file strings: date,clicks,installs,earning 05/25/2013,0,0,0.00 05/26/2013,60,0,0.00 What is going wrong ? Thanks
I have a CSV file with UTF8 encoding. Separator is ",". I have 3 strings in that file. The following code: Code: Copy AppBrainRes = su.LoadCSV (File.DirInternal,"AppBrainCSV",",") For i=0 To AppBrainRes.Size -1 Log (AppBrainRes.Get(i)) Next In log windows I have 3 lines: [Ljava.lang.String;@2bc5dbc0 [Ljava.lang.String;@2bc5dc98 [Ljava.lang.String;@2bc5dd40 CSV file strings: date,clicks,installs,earning 05/25/2013,0,0,0.00 05/26/2013,60,0,0.00 What is going wrong ? Thanks
Johnmcenroy Active Member Licensed User Longtime User May 27, 2013 #2 How I understood it returns Array of strings in a list . How to get strings from that ? Upvote 0
Johnmcenroy Active Member Licensed User Longtime User May 27, 2013 #3 I done so Code: Copy For i=0 To AppBrainRes.Size -1 AppBrainResStr = AppBrainRes.Get(i) 'String Array = String Array (i) from List For n=0 To AppBrainResStr.Length -1 Log (AppBrainResStr(n)) Next Next All works fine Last edited: May 27, 2013 Upvote 0
I done so Code: Copy For i=0 To AppBrainRes.Size -1 AppBrainResStr = AppBrainRes.Get(i) 'String Array = String Array (i) from List For n=0 To AppBrainResStr.Length -1 Log (AppBrainResStr(n)) Next Next All works fine
Erel B4X founder Staff member Licensed User Longtime User May 27, 2013 #4 You can also write it this way: Code: Copy For Each Row() As String In su.LoadCSV (File.DirInternal,"AppBrainCSV",",") For Each n As String in Row Log(n) Next Next Upvote 0
You can also write it this way: Code: Copy For Each Row() As String In su.LoadCSV (File.DirInternal,"AppBrainCSV",",") For Each n As String in Row Log(n) Next Next