You definitely should post how your input file looks like (it does not have to be your real data, you can post sample data, but the structure should be the same as your original file), otherwise no one can know how it looks like, hence we cannot provide you appropriate code.
Don't forget to use the code tags