errors when exporting to EXCEL!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • firasjabur
    New Member
    • Feb 2008
    • 3

    errors when exporting to EXCEL!

    Hi All,
    I have a .aspx page that on Page_Load, DataBinds a GridView from a database. I then export the same page to EXCEL using
    Response.Buffer = true;
    Response.Conten tType = "applicatio n/vnd.ms-excel";
    Response.AddHea der("Content Disposition", "attachement;fi lename=Clientes .xls");
    Response.Charse t = "";
    this.EnableView State = false;
    [/I]
    The Excel page then looks beautiful, but, for example, if one of the columns holds CustomerID like 120004513076 then the EXCEL sheet would transform the column into general format, so the number would appear like 1.20005E+11
    Any suggestions? Help is greatly appreciated!
  • firasjabur
    New Member
    • Feb 2008
    • 3

    #2
    Thanx a million Steve, your solution works like a magic!

    Comment

    Working...