0
是否有排除Excel文件中DhtmlxGrid的隱藏列的方法?MVC3 - 如何排除Excel文件中的Dhtmlxgrid的隱藏列
現在,當我輸出爲excel時,它還包含隱藏在excel中的列。請建議。
MVC3
in View:
on a button click my code:
_grid.toExcel('@Url.Content("~/Shared/ExportGridToExcel?TableName")' +'Doc');
in Controller:
public ActionResult ExportGridToExcel(string TableName)
{
var generator = new ExcelWriter();
var xml = this.Request.Form["grid_xml"];
xml = this.Server.UrlDecode(xml);
var stream = generator.Generate(xml);
return File(stream.ToArray(), generator.ContentType, TableName + ".xls");
}