Hi Guys.
I have a csv file which is converted to a .txt file. Please find the txt file attached. The other csv is having difficulty uploading. Ill try on a seperate post to try and upload this.
I need to take the csv file and write some code to it so it writes to either:
1. Another csv file or a txt file directly without any of the trailing commas at the end of each line. )Line 1,3,5,7 etc have 10 or so commas which dont need to be there. Also line 2, 4, 6 etc contains an amount with speach marks, The speach mark in line 2 number is "3,543.00".
I was able to use some code which takes one file and writes to another which removes the comma's, this works, however i now need to edit the code so that it picks up the " speach marks " and removes them also :
Dim TextLine As String, comma As String
comma = ","
Close #1
Close #2
Open "c:\Dubai Payslips\input.csv" For Input As #1
Open "c:\Dubai Payslips\output.csv" For Output As #2
Do While Not EOF(1)
Line Input #1, TextLine
l = Len(TextLine)
For i = 1 To l
If Right(TextLine, 1) = comma Then
TextLine = Left(TextLine, Len(TextLine) - 1)
End If
Next
Print #2, TextLine
Loop
Close #1
Close #2
Does anyone know how i can do this?
Regards
Shil
Bookmarks