Ayushi,
the best way to see what happened is as mentioned by others, to debug your code. I do see also that you are doing a replace ( \\r with "" so that may be where your value is going blank... the only way to know would be to set a breakpoint in the row split line and see whether or not you indeed have that many columns or if your value is getting set to empty string.
hope this helps - good luck