Fixing some issues while extracting records from excel