While exporting data from gridview to excel using asp.net and c#. how to set one column as decimal number with two digit and another column as decimal number with three digit in excel.
StringWriter sw = new StringWriter()
HtmlTextWriter htw = new HtmlTextWriter(sw);
htw.WriteLine(@"<style>.number {mso-number-format:0\.000; } </style>");
Void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (gvr.RowType == DataControlRowType.DataRow) {
gvr.Cells[8].Attributes.Add("class", "number");
gvr.Cells[9].Attributes. ...
Go to the complete details ...