I have been search the net for a suitable code for this requirement, but not getting any.
I have this csv file (values are not exact, one of field of the actual csv contains bmp image code)
"NAME","ROLENUMBER","SECTION","SEAT","COMMENT" "Abhik","45","AVC","A112004DDG","HELLO3434?" "Bob",,"AVC","FDFDF1212","IN THIS FIELD THE USER CAN MISTAKENLY ADD TWO COMMAS LIKE ,, OR ,,," "JOHN",,,"DFDFEDD22E","HEL;O AGAIN"
the requirement is to somehow insert a "" between every two or more ,(commas) (,, or more commas will tell me that the field value is blank except for the comment field where the user can enter that by mistake as shown in the example) so that program can understand the blank values (it is an existing logic which I dont want to change very much if Ican help it)
So after parsing the csv rows should look like "NAME","ROLENUMBER","SECTION","SEAT","COMMENT" "Abhik","45","AVC","A112004DDG","HELLO3434?" "Bob","","AVC","FDFDF1212","IN THIS FIELD THE USER CAN MISTAKENLY ADD TWO COMMAS LIKE ,, OR ,,," "JOHN","","","DFDFEDD22E","HEL;O AGAIN"
Please help! Thanks in advance!