Example #1
0
        public static ICell GetCell(this ISheet sheet1, int rowId, int columnId, CellType type = CellType.String)
        {
            IRow  row  = sheet1.GetRowEx(rowId);
            ICell cell = row.GetCellEx(columnId, type);

            return(cell);
        }
Example #2
0
 public static ICellStyle SetRegionStyle(this ISheet ISheet1, int startRow, int startColumn, int endRow,
                                         int endColumn, ICellStyle style)
 {
     for (int iRow = startRow; iRow <= endRow; iRow++)
     {
         IRow row = ISheet1.GetRowEx(iRow);
         for (int iCol = startColumn; iCol <= endColumn; iCol++)
         {
             //Cell ICell = row.GetCell(iCol);
             //if (cell != null)
             //{
             //    cell.ICellStyle = style;
             //}
             ICell cell = row.GetCellEx(iCol);
             cell.CellStyle = style;
         }
     }
     return(style);
 }