/// <summary> /// 获取单元格样式 /// </summary> /// <param name="cellStyle"></param> /// <returns><c>ICellStyle</c></returns> private ICellStyle GetCellStyle(CellStyle cellStyle) { if (this._cellStyles.ContainsKey(cellStyle)) { return(this._cellStyles[cellStyle]); } var excelCellStyle = new ExcelCellStyle(this._workbook); var style = excelCellStyle.BuildCellStyle(cellStyle); this._cellStyles.Add(cellStyle, style); return(style); }
/// <summary> /// 获取单元格样式 /// </summary> /// <param name="cellStyle"></param> /// <returns><c>ICellStyle</c></returns> private ICellStyle GetCellStyle(CellStyle cellStyle) { if (this._cellStyles.ContainsKey(cellStyle)) return this._cellStyles[cellStyle]; var excelCellStyle = new ExcelCellStyle(this._workbook); var style = excelCellStyle.BuildCellStyle(cellStyle); this._cellStyles.Add(cellStyle, style); return style; }