Dim LogList, hdr as List
LogList.Initialize
hdr.Initialize2( Array As String( "Date", "Amount","Business" ,"Category", "Description", "Vendor", "Bank", "Picture" ))
Log( "ExportDB.CSV.Log.RowCount: " & Cursor1.RowCount
' now save data
For row = 0 To Cursor1.RowCount - 1
Private RowData( Cursor1.ColumnCount ) As String
Cursor1.Position = row 'set the Cursor to each row
' save the date
RowData( 0 ) = DateTime.Date( Cursor1.GetLong2( 0 ) )
' then save the data columns
For col = 1 To Cursor1.ColumnCount-1
If Cursor1.GetString2( col ) <> Null Then
RowData( col ) = Cursor1.GetString2( col ).Replace( CRLF, " " ) ' eliminate new line that may be embedded in Description field
Else
RowData( col ) = ""
End If
Next
LogList.Add( RowData )
Next
Log( "ExportDB.CSV.LogList.Size = " & LogList.Size )
hdr.Initialize2( Array As String( "Date", "Amount","Business" ,"Category", "Description", "Vendor", "Bank", "Picture" ))
su.SaveCSV2( Starter.DownloadPath, FileName, ",", LogList, hdr )