iOS Question edit csv file

enrique flores

Member
Licensed User
How can i insert in a specific row and colunm? i'm using a CSV file and then loading it with StringUtils.

Dim su As StringUtils
Dim Table As List
Table = su.LoadCSV(File.DirDocuments, "1.csv", ",")
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Table is a List. You can call Table.InsertAt to add rows. Adding columns is a bit more difficult. You will need to do something like:
B4X:
For i = 0 To Table.Size - 1
   Dim row() As String = Table.Get(i)
   Dim newRow(row.Length + 1) As String
   'copy the items from row to newRow and add the new value wherever it needed
   newRow(0) = row(0)
   '...
   Table.Set(i, newRow)
Next
 
Upvote 0
Top