using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ExcelReaderWrite { public class ExcelEnum { #region ExcelHAlign 水平对齐方式 /// /// 水平对齐方式 /// public enum ExcelHAlign { xlHAlignGeneral = Excel.XlHAlign.xlHAlignCenter, xlHAlignLeft = Excel.XlHAlign.xlHAlignLeft, xlHAlignCenter = Excel.XlHAlign.xlHAlignCenter, xlHAlignRight = Excel.XlHAlign.xlHAlignRight, xlHAlignFill = Excel.XlHAlign.xlHAlignFill, xlHAlignJustify = Excel.XlHAlign.xlHAlignJustify, xlHAlignCenterAcrossSelection = Excel.XlHAlign.xlHAlignCenterAcrossSelection, xlHAlignDistributed = Excel.XlHAlign.xlHAlignDistributed } #endregion #region ExcelVAlign 垂直对齐方式 /// /// 垂直对齐方式 /// public enum ExcelVAlign { xlVAlignTop = Excel.XlVAlign.xlVAlignTop, xlVAlignCenter = Excel.XlVAlign.xlVAlignCenter, xlVAlignBottom = Excel.XlVAlign.xlVAlignBottom, xlVAlignJustify = Excel.XlVAlign.xlVAlignJustify, xlVAlignDistributed = Excel.XlVAlign.xlVAlignDistributed } #endregion #region BorderWeight 线粗 /// /// 线粗 /// public enum BorderWeight { xlThin = Excel.XlBorderWeight.xlThin, xlThick = Excel.XlBorderWeight.xlThick, xlMedium = Excel.XlBorderWeight.xlMedium, xlHairline = Excel.XlBorderWeight.xlHairline, xlNone = -4142 } #endregion #region LineStyle 线样式 /// /// 线样式 /// public enum LineStyle { xlContinuous = Excel.XlLineStyle.xlContinuous, xlDash = Excel.XlLineStyle.xlDash, xlDashDot = Excel.XlLineStyle.xlDashDot, xlDashDotDot = Excel.XlLineStyle.xlDashDotDot, xlDot = Excel.XlLineStyle.xlDot, xlDoubleLine = Excel.XlLineStyle.xlDouble, xlNone = Excel.XlLineStyle.xlLineStyleNone, xlSlantDashDot = Excel.XlLineStyle.xlSlantDashDot } #endregion #region Edge 边框 /// /// 边框 /// public enum Edge { xlEdgeTop = Excel.XlBordersIndex.xlEdgeTop, xlEdgeBottom = Excel.XlBordersIndex.xlEdgeBottom, xlEdgeLeft = Excel.XlBordersIndex.xlEdgeLeft, xlEdgeRight = Excel.XlBordersIndex.xlEdgeRight, xlInsideHorizontal = Excel.XlBordersIndex.xlInsideHorizontal, xlInsideVertical = Excel.XlBordersIndex.xlInsideVertical, xlDiagonalDown = Excel.XlBordersIndex.xlDiagonalDown, xlDiagonalUp = Excel.XlBordersIndex.xlDiagonalUp } #endregion #region UnderlineStyle 下划线方式 /// /// 下划线方式 /// public enum UnderlineStyle { xlNone = Excel.XlUnderlineStyle.xlUnderlineStyleNone, xlDouble = Excel.XlUnderlineStyle.xlUnderlineStyleDouble, xlDoubleFill = Excel.XlUnderlineStyle.xlUnderlineStyleDoubleAccounting, xlSingle = Excel.XlUnderlineStyle.xlUnderlineStyleSingle, xlSingleFill = Excel.XlUnderlineStyle.xlUnderlineStyleSingleAccounting } #endregion #region Pattern 单元格填充方式 /// /// 单元格填充方式 /// public enum Pattern { Automatic = -4105, Checker = 9, CrissCross = 16, Down = -4121, Gray16 = 17, Gray25 = -4124, Gray50 = -4125, Gray75 = -4126, Gray8 = 18, Grid = 15, Horizontal = -4128, LightDown = 13, LightHorizontal = 11, LightUp = 14, LightVertical = 12, None = -4142, SemiGray75 = 10, Solid = 1, Up = -4162, Vertical = -4166 } #endregion #region ColorIndex 常用颜色定义,对就Excel中颜色名 /// /// 常用颜色定义,对就Excel中颜色名 /// public enum ColorIndex { None = -4142, Auto = -4105, Black = 1, Brown = 53, Olive = 52, DeepLime = 51, DeepGreen = 49, DeepBlue = 11, DarkBlue = 55, Gray80 = 56, DeepRed = 9, Orange = 46, DeepOrange = 12, Green = 10, Lime = 14, Blue = 5, BlueGray = 47, Gray50 = 16, Red = 3, LightOrange = 45, SliverOrange = 43, SeaGreen = 50, WaterGreen = 42, LittleBlue = 41, Violet = 13, Gray40 = 48, Pink = 7, Golden = 44, Yellow = 6, SpringGreen = 4, LimeGreen = 8, SkyBlue = 33, Crimson = 54, Gray25 = 15, Rose = 38, Tea = 40, LightYellow = 36, LightGreen = 35, LightLimeGreen = 34, LightBlue = 37, lilac = 39, White = 2 } #endregion } }