Example #1
0
        public void SetCellStyle(int k, int mrow, int mcol, string CssStyle)
        {
            k = k - 1;
            string Result = "";
            ISheet sheet  = wb.GetSheetAt(k);

            mrow = mrow - 1;
            mcol = mcol - 1;

            IRow row = sheet.GetRow(mrow);

            if (row == null)
            {
                row = sheet.CreateRow(mrow);
            }
            ICell cell = row.GetCell(mcol); //|| (cell.CellType != CellType.String)

            if (cell == null)
            {
                cell = row.CreateCell(mcol);
            }

            cell.CSS(CssStyle);
        }