Beispiel #1
0
 /// <summary>
 /// Write given model data to sheet supported data types(int,bool,datetime,string,double,float)
 /// </summary>
 /// <param name="sheet"></param>
 /// <param name="data"></param>
 /// <param name="headerStyle">Header row style</param>
 /// <param name="headerColor">Header row color</param>
 /// <param name="textStyle">text style for whole sheet</param>
 /// <param name="textColor">Text color</param>
 /// <returns></returns>
 public static ISheet Write <TModel>(this ISheet sheet, IList <TModel> data, Style headerStyle = Style.H2, Color headerColor = Color.Black, Style textStyle = Style.Normal, Color textColor = Color.Black)
 {
     sheet.SetHeader(data, headerStyle, headerColor);
     sheet.FillData(data, textStyle, textColor);
     return(sheet);
 }