Results 1 to 40 of 53

Thread: [RESOLVED] VB6 & Reading CSV file with data including spaces

Threaded View

  1. #25

    Thread Starter
    Lively Member
    Join Date
    Mar 2012
    Posts
    113

    Re: [RESOLVED] VB6 & Reading CSV file with data including spaces

    Thanks for the reply dilettante,

    ok, here it goes. What I am doing is I am doing few formatting which are possible through first ado sql statement like

    Code:
    rsCSVData.Open "SELECT [BNFAC],[BNFName],Format$([Amount], '####.000') AS [Amount], Left$([tCode] & String(8, 'X'),  8) AS [tCode]," _
            & "[OrdCustAC],[OrdCustName],[Description]," _
                & "IIf(Left$([tCode] & String(8, 'X'),  8) = '" & lblIntExtCriteria.caption & "', 'Internal', IIf(Format$([Amount], '####.000')>Format$(20000.000, '####.000'),'Others','External'))  AS [Type] " _
                    & "from [" & FileName & "] WHERE [Amount] > 0", connCSV, adOpenStatic, adLockReadOnly, adCmdText
    Now, with this I have recordset with formatting and only required records which have to be considered; so this is the recordset I am talking about. Now I need to save this and then this saved new csv file I will clean up with your csv cleaner and then export into a xml.

    Hope I am clear enough this time, hence the request for the help on saving of recordset into csv file.

    Code:
    But in your case you don't have a Recordset anyway, do you? What form of "CSV cleaning" did you end up using?
    I have not used the csv cleaning yet, once i get the above recordset saved i will clean the new saved csv.

    Best Regards,

    Sam
    Last edited by sam4help; Mar 21st, 2012 at 11:10 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width