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
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.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
Hope I am clear enough this time, hence the request for the help on saving of recordset into csv file.
I have not used the csv cleaning yet, once i get the above recordset saved i will clean the new saved csv.Code:But in your case you don't have a Recordset anyway, do you? What form of "CSV cleaning" did you end up using?
Best Regards,
Sam




Reply With Quote