/** * Returns a {@link CellFormat} that applies the given format. Two calls * with the same format may or may not return the same object. * * @param format The format. * * @return A {@link CellFormat} that applies the given format. */ public static CellFormat GetInstance(String format) { CellFormat fmt = null; if (formatCache.ContainsKey(format)) fmt = formatCache[format]; if (fmt == null) { if (format.Equals("General") || format.Equals("@")) fmt = GENERAL_FORMAT; else fmt = new CellFormat(format); formatCache.Add(format, fmt); } return fmt; }
private MyCellFormat(string format) { this.cellformat = NPOI.SS.Format.CellFormat.GetInstance(format); }