text: public String FormatNumberDateCell(CellValueRecordInterface cell){double value;if (cell is NumberRecord){value = ((NumberRecord)cell).Value;}else if (cell is FormulaRecord){value = ((FormulaRecord)cell).Value;}else{throw new ArgumentException("Unsupported CellValue Record passed in " + cell);}int formatIndex = GetFormatIndex(cell);String formatString = GetFormatString(cell);if (formatString == null){return value.ToString(CultureInfo.InvariantCulture);}else{return formatter.FormatRawCellContents(value, formatIndex, formatString);}}