E enrique flores Member Licensed User May 10, 2017 #1 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", ",")
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 May 10, 2017 #2 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: Code: 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
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: Code: 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