/// <summary> /// Returns excel number format attribute for given excelcellformat value. /// </summary> /// <param name="excelCellFormat">Excel cell format value.</param> /// <returns>Excel number format attribute.</returns> public static ExcelNumberFormatAttribute GetExcelFormatMemberAttribute(ExcelCellFormat excelCellFormat) { var excelCellFormatType = typeof(ExcelCellFormat); var formatMember = excelCellFormatType.GetMember(excelCellFormat.ToString()); return((ExcelNumberFormatAttribute)formatMember[0].GetCustomAttribute(typeof(ExcelNumberFormatAttribute), false)); }