Share |

Thursday, March 19, 2015

How to make all columns as Text in excel export in ASP.NET




Some time integer or any other datatype columns internally get formatted and shows scientific numbers instead of actual value.


To solve this issue we can use following "style" to make all columns as Text in excel.

string style = @"<style> TD { mso-number-format:\@; } </style>";