Пример #1
0
 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));
 }
Пример #2
0
 public ExcelFile()
 {
     InitializeWorkbook();
     ICellStyleManager.Clear();
 }
Пример #3
0
        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;
        }
Пример #4
0
        public static ICellStyle CreateFillColor(this IWorkbook workbook, HSSFColor color)
        {
            ICellStyle style1 = ICellStyleManager.CreateStyle(workbook);

            return(style1.SetFillColor(color));
        }
Пример #5
0
        public static ICellStyle CreateBackgroundColor(this IWorkbook workbook, HSSFColor foreColor, HSSFColor backColor, FillPattern pattern)
        {
            ICellStyle style1 = ICellStyleManager.CreateStyle(workbook);

            return(style1.SetBackgroundColor(foreColor, backColor, pattern));
        }
Пример #6
0
        public static ICellStyle CreateBorder(this IWorkbook hssfworkbook, HSSFColor color)
        {
            ICellStyle blackBorder = ICellStyleManager.CreateStyle(hssfworkbook);

            return(blackBorder.SetBorder(color));
        }