Refer my article
Export GridView To Word Excel PDF CSV Formats in ASP.Net
Here I am exporting to Excel and before exporting I am applying a style TextMode to all cells. So that all cells are treated a string
 
If i Mod 2 <> 0 Then
               row.Cells(0).Attributes.Add("class", "textmode")
                         row.Cells(1).Attributes.Add("class", "textmode")
                        row.Cells(2).Attributes.Add("class", "textmode")
                       row.Cells(3).Attributes.Add("class", "textmode")
           End If