diff --git a/ClosedXML/ClosedXML.csproj b/ClosedXML/ClosedXML.csproj index 4bc2ce0..f362632 100644 --- a/ClosedXML/ClosedXML.csproj +++ b/ClosedXML/ClosedXML.csproj @@ -83,6 +83,7 @@ + diff --git a/ClosedXML/Excel/Style/XLPredefinedFormat.cs b/ClosedXML/Excel/Style/XLPredefinedFormat.cs new file mode 100644 index 0000000..32c6e1a --- /dev/null +++ b/ClosedXML/Excel/Style/XLPredefinedFormat.cs @@ -0,0 +1,165 @@ +namespace ClosedXML.Excel +{ + /// + /// Reference point of date/number formats available. + /// See more at: https://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.numberingformat.aspx + /// + public static class XLPredefinedFormat + { + public enum Number + { + /// + /// General + /// + General = 0, + + /// + /// 0 + /// + Integer = 1, + + /// + /// 0.00 + /// + Precision2 = 2, + + /// + /// #,##0 + /// + IntegerWithSeparator = 3, + + /// + /// #,##0.00 + /// + Precision2WithSeparator = 4, + + /// + /// 0% + /// + PercentInteger = 9, + + /// + /// 0.00% + /// + PercentPrecision2 = 10, + + /// + /// 0.00E+00 + /// + ScientificPrecision2 = 11, + + /// + /// # ?/? + /// + FractionPrecision1 = 12, + + /// + /// # ??/?? + /// + FractionPrecision2 = 13, + + /// + /// #,##0 ,(#,##0) + /// + IntegerWithSeparatorAndParens = 37, + + /// + /// #,##0 ,[Red](#,##0) + /// + IntegerWithSeparatorAndParensRed = 38, + + /// + /// #,##0.00,(#,##0.00) + /// + Precision2WithSeparatorAndParens = 39, + + /// + /// #,##0.00,[Red](#,##0.00) + /// + Precision2WithSeparatorAndParensRed = 40, + + /// + /// ##0.0E+0 + /// + ScientificUpToHundredsAndPrecision1 = 48, + + /// + /// @ + /// + Text = 49 + } + + public enum DateTime + { + /// + /// General + /// + General = 0, + + /// + /// d/m/yyyy + /// + DayMonthYear4WithSlashes = 14, + + /// + /// d-mmm-yy + /// + DayMonthAbbrYear2WithDashes = 15, + + /// + /// d-mmm + /// + DayMonthAbbrWithDash = 16, + + /// + /// mmm-yy + /// + MonthAbbrYear2WithDash = 17, + + /// + /// h:mm tt + /// + Hour12MinutesAmPm = 18, + + /// + /// h:mm:ss tt + /// + Hour12MinutesSecondsAmPm = 19, + + /// + /// H:mm + /// + Hour24Minutes = 20, + + /// + /// H:mm:ss + /// + Hour24MinutesSeconds = 21, + + /// + /// m/d/yyyy H:mm + /// + MonthDayYear4WithDashesHour24Minutes = 22, + + /// + /// mm:ss + /// + MinutesSeconds = 45, + + /// + /// [h]:mm:ss + /// + Hour12MinutesSeconds = 46, + + /// + /// mmss.0 + /// + MinutesSecondsMillis1 = 47, + + /// + /// @ + /// + Text = 49 + } + } +}