public void ExpToExc(string GridModel) { ExcelExport exp = new ExcelExport(); var DataSource = SessionManager.Get <List <MdlContrato> >("DContratos"); GridProperties obj = fc.ConvertGridObject(GridModel); obj.ServerExcelQueryCellInfo = fc.QueryCellInfo; try { exp.Export(obj, DataSource, "Contratos.xls", ExcelVersion.Excel97to2003, false, false, "flat-saffron"); } catch (Exception ex) { string err = ex.Message; } }