public void cloneStyleFrom(HSSFCellStyle source) {_format.cloneStyleFrom(source._format);if(_workbook != source._workbook) {lastDateFormat.set(Short.MIN_VALUE);lastFormats.remove();getDataFormatStringCache.remove();short fmt = (short)_workbook.createFormat(source.getDataFormatString() );setDataFormat(fmt);FontRecord fr = _workbook.createNewFont();fr.cloneStyleFrom(source._workbook.getFontRecordAt(source.getFontIndexAsInt()));HSSFFont font = new HSSFFont((short)_workbook.getFontIndex(fr), fr);setFont(font);}}
public void CloneStyleFrom(HSSFCellStyle source){_format.CloneStyleFrom(source._format);if (_workbook != source._workbook){lastDateFormat = short.MinValue;lastFormats = null;getDataFormatStringCache = null;short fmt = (short)_workbook.CreateFormat(source.GetDataFormatString());this.DataFormat=(fmt);FontRecord fr = _workbook.CreateNewFont();fr.CloneStyleFrom(source._workbook.GetFontRecordAt(source.FontIndex));HSSFFont font = new HSSFFont((short)_workbook.GetFontIndex(fr), fr);this.SetFont(font);}}