Exemplo n.º 1
0
        public bool SetCellStyle(short sheet, int row, int column, int ixf, CellType type)
        {
            IExcelCell cell = this._workbook.Worksheets[sheet].GetCell(row, column, true);

            if (cell != null)
            {
                cell.CellType = type;
                cell.SetFormatId(ixf);
                return(true);
            }
            return(false);
        }
Exemplo n.º 2
0
        public bool SetCell(short sheet, int row, int column, object value, CellType type, int ixf, IExcelFormula cellFormula)
        {
            IExcelCell cell = this._workbook.Worksheets[sheet].GetCell(row, column, true);

            if (cell == null)
            {
                return(false);
            }
            if (value != null)
            {
                cell.Value = value;
            }
            cell.SetFormatId(ixf);
            cell.CellType = type;
            if ((cellFormula != null) && ((cell.CellFormula == null) || !cell.CellFormula.IsArrayFormula))
            {
                cell.CellFormula = cellFormula;
            }
            return(true);
        }