Can someone advise me what I am doing wrong or tell me how to fix this code? This is code that I copied from the web site so I assume it works and that I am doing something wrong. Instead of ending up with a csv file with one record per TabelView row I end up with 22 records per TableView. 22 happens to be the number of columns of the TableView.
<code>
exportTableViewToCSV(tvMaster,"CashFlow.csv")
Sub exportTableViewToCSV(tv As TableView, filename As String)
Dim su As StringUtils
Dim l As List
l.Initialize
For y = 0 To tv.Items.Size - 1
tv.SelectedRow = y
Dim Row() As Object = tv.SelectedRowValues
Dim NRow(Row.Length) As String
For x = 0 To Row.Length - 1
NRow(x) = Row(x)
l.Add(NRow)
Next
Next
Try
su.SaveCSV(dirData, filename, ",", l)
Catch
Log(LastException.Message)
End Try
End Sub
</code>
<code>
exportTableViewToCSV(tvMaster,"CashFlow.csv")
Sub exportTableViewToCSV(tv As TableView, filename As String)
Dim su As StringUtils
Dim l As List
l.Initialize
For y = 0 To tv.Items.Size - 1
tv.SelectedRow = y
Dim Row() As Object = tv.SelectedRowValues
Dim NRow(Row.Length) As String
For x = 0 To Row.Length - 1
NRow(x) = Row(x)
l.Add(NRow)
Next
Next
Try
su.SaveCSV(dirData, filename, ",", l)
Catch
Log(LastException.Message)
End Try
End Sub
</code>