R
RSB
Hi Everyone,
i am using the following code to transfer a DataGrid to Excel File.
Every thing works ok beside the long numerice value like 0000121900000000
gets converted to 1.219E+11.
how can i disable that conversion?
Thanks for the Help
RSB
public static void DataGridToExcel(DataGrid dgExport, HttpResponse
response){
response.Clear();
response.Charset = "";
response.ContentType = "application/vnd.ms-excel";
StringWriter stringWrite = new StringWriter();
HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);
DataGrid dg = new DataGrid();
dg = dgExport;
dg.AllowPaging = false;
dg.AllowSorting = false;
dg.GridLines = GridLines.Both;
dg.HeaderStyle.Font.Bold = true;
dg.DataBind();
dg.RenderControl(htmlWrite);
response.Write(stringWrite.ToString());
response.End();
}
i am using the following code to transfer a DataGrid to Excel File.
Every thing works ok beside the long numerice value like 0000121900000000
gets converted to 1.219E+11.
how can i disable that conversion?
Thanks for the Help
RSB
public static void DataGridToExcel(DataGrid dgExport, HttpResponse
response){
response.Clear();
response.Charset = "";
response.ContentType = "application/vnd.ms-excel";
StringWriter stringWrite = new StringWriter();
HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);
DataGrid dg = new DataGrid();
dg = dgExport;
dg.AllowPaging = false;
dg.AllowSorting = false;
dg.GridLines = GridLines.Both;
dg.HeaderStyle.Font.Bold = true;
dg.DataBind();
dg.RenderControl(htmlWrite);
response.Write(stringWrite.ToString());
response.End();
}