public static ICellStyle SetRegionColor(this ISheet ISheet1, int startRow, int startColumn, int endRow, int endColumn, HSSFColor color, ICellStyle style) { if (style == null) { style = ICellStyleManager.CreateStyle(ISheet1.Workbook); } style.SetFillColor(color); return(ISheet1.SetRegionStyle(startRow, startColumn, endRow, endColumn, style)); }
public ExcelFile() { InitializeWorkbook(); ICellStyleManager.Clear(); }
public static void SetICellStyle(this ICell cell, short fontSize, bool isBold, bool isBorder, bool isCenter = false) { var style = ICellStyleManager.GetICellStyle(cell.Sheet.Workbook, fontSize, isBold, isBorder, isCenter); cell.CellStyle = style; }
public static ICellStyle CreateFillColor(this IWorkbook workbook, HSSFColor color) { ICellStyle style1 = ICellStyleManager.CreateStyle(workbook); return(style1.SetFillColor(color)); }
public static ICellStyle CreateBackgroundColor(this IWorkbook workbook, HSSFColor foreColor, HSSFColor backColor, FillPattern pattern) { ICellStyle style1 = ICellStyleManager.CreateStyle(workbook); return(style1.SetBackgroundColor(foreColor, backColor, pattern)); }
public static ICellStyle CreateBorder(this IWorkbook hssfworkbook, HSSFColor color) { ICellStyle blackBorder = ICellStyleManager.CreateStyle(hssfworkbook); return(blackBorder.SetBorder(color)); }