/// <summary> /// Export data table to Excel /// </summary> /// <remarks> /// Author: PhatLT. FPTSS. /// Created date: 14/02/2011 /// </remarks> public void ExportToExcel(DataView view, DataGridTableStyle grdStyle, int startRow, int startCol, Excel.Worksheet sheet) { clsCommon common = new clsCommon(); string[] headers = null; int[] indexes = null; common.GetExportInfo(view, grdStyle.GridColumnStyles, ref headers, ref indexes); ExportToExcel(view, headers, indexes, startRow, startCol, sheet); }
/// <summary> /// Export data table to Excel like DataGridTableStyle /// </summary> /// <param name="view"></param> /// <param name="grdStyle"></param> /// <param name="startRow"></param> /// <param name="startCol"></param> /// <remarks> /// Author: PhatLT. FPTSS. /// Created date: 14/02/2011 /// </remarks> public void ExportToExcel(DataView view, DataGridTableStyle grdStyle, int startRow, int startCol) { if(view == null || grdStyle == null) return; clsCommon common = new clsCommon(); string[] headers = null; int[] indexes = null; common.GetExportInfo(view, grdStyle.GridColumnStyles, ref headers, ref indexes); ExportToExcel(view, headers, indexes, startRow, startCol); }