Export to Excel from a Repeater?

前端 未结 3 1953
执念已碎
执念已碎 2021-01-05 12:37

Right now I am using this to export a repeater (with multiple nested repeaters) to excel:

protected void ExportToExcel(object sender, EventArgs e) 
{     
Re         


        
3条回答
  •  忘掉有多难
    2021-01-05 12:52

    You need to enclose all of that in table tags. Excel can understand HTML table structures.

    Try:

    Response.Write("");
    Response.Write(stringWrite.ToString()); 
    Response.Write("
    ");

提交回复
热议问题