ExcelEnum.cs 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace ExcelReaderWrite
  6. {
  7. public class ExcelEnum
  8. {
  9. #region ExcelHAlign 水平对齐方式
  10. /// <summary>
  11. /// 水平对齐方式
  12. /// </summary>
  13. public enum ExcelHAlign
  14. {
  15. xlHAlignGeneral = Excel.XlHAlign.xlHAlignCenter,
  16. xlHAlignLeft = Excel.XlHAlign.xlHAlignLeft,
  17. xlHAlignCenter = Excel.XlHAlign.xlHAlignCenter,
  18. xlHAlignRight = Excel.XlHAlign.xlHAlignRight,
  19. xlHAlignFill = Excel.XlHAlign.xlHAlignFill,
  20. xlHAlignJustify = Excel.XlHAlign.xlHAlignJustify,
  21. xlHAlignCenterAcrossSelection = Excel.XlHAlign.xlHAlignCenterAcrossSelection,
  22. xlHAlignDistributed = Excel.XlHAlign.xlHAlignDistributed
  23. }
  24. #endregion
  25. #region ExcelVAlign 垂直对齐方式
  26. /// <summary>
  27. /// 垂直对齐方式
  28. /// </summary>
  29. public enum ExcelVAlign
  30. {
  31. xlVAlignTop = Excel.XlVAlign.xlVAlignTop,
  32. xlVAlignCenter = Excel.XlVAlign.xlVAlignCenter,
  33. xlVAlignBottom = Excel.XlVAlign.xlVAlignBottom,
  34. xlVAlignJustify = Excel.XlVAlign.xlVAlignJustify,
  35. xlVAlignDistributed = Excel.XlVAlign.xlVAlignDistributed
  36. }
  37. #endregion
  38. #region BorderWeight 线粗
  39. /// <summary>
  40. /// 线粗
  41. /// </summary>
  42. public enum BorderWeight
  43. {
  44. xlThin = Excel.XlBorderWeight.xlThin,
  45. xlThick = Excel.XlBorderWeight.xlThick,
  46. xlMedium = Excel.XlBorderWeight.xlMedium,
  47. xlHairline = Excel.XlBorderWeight.xlHairline,
  48. xlNone = -4142
  49. }
  50. #endregion
  51. #region LineStyle 线样式
  52. /// <summary>
  53. /// 线样式
  54. /// </summary>
  55. public enum LineStyle
  56. {
  57. xlContinuous = Excel.XlLineStyle.xlContinuous,
  58. xlDash = Excel.XlLineStyle.xlDash,
  59. xlDashDot = Excel.XlLineStyle.xlDashDot,
  60. xlDashDotDot = Excel.XlLineStyle.xlDashDotDot,
  61. xlDot = Excel.XlLineStyle.xlDot,
  62. xlDoubleLine = Excel.XlLineStyle.xlDouble,
  63. xlNone = Excel.XlLineStyle.xlLineStyleNone,
  64. xlSlantDashDot = Excel.XlLineStyle.xlSlantDashDot
  65. }
  66. #endregion
  67. #region Edge 边框
  68. /// <summary>
  69. /// 边框
  70. /// </summary>
  71. public enum Edge
  72. {
  73. xlEdgeTop = Excel.XlBordersIndex.xlEdgeTop,
  74. xlEdgeBottom = Excel.XlBordersIndex.xlEdgeBottom,
  75. xlEdgeLeft = Excel.XlBordersIndex.xlEdgeLeft,
  76. xlEdgeRight = Excel.XlBordersIndex.xlEdgeRight,
  77. xlInsideHorizontal = Excel.XlBordersIndex.xlInsideHorizontal,
  78. xlInsideVertical = Excel.XlBordersIndex.xlInsideVertical,
  79. xlDiagonalDown = Excel.XlBordersIndex.xlDiagonalDown,
  80. xlDiagonalUp = Excel.XlBordersIndex.xlDiagonalUp
  81. }
  82. #endregion
  83. #region UnderlineStyle 下划线方式
  84. /// <summary>
  85. /// 下划线方式
  86. /// </summary>
  87. public enum UnderlineStyle
  88. {
  89. xlNone = Excel.XlUnderlineStyle.xlUnderlineStyleNone,
  90. xlDouble = Excel.XlUnderlineStyle.xlUnderlineStyleDouble,
  91. xlDoubleFill = Excel.XlUnderlineStyle.xlUnderlineStyleDoubleAccounting,
  92. xlSingle = Excel.XlUnderlineStyle.xlUnderlineStyleSingle,
  93. xlSingleFill = Excel.XlUnderlineStyle.xlUnderlineStyleSingleAccounting
  94. }
  95. #endregion
  96. #region Pattern 单元格填充方式
  97. /// <summary>
  98. /// 单元格填充方式
  99. /// </summary>
  100. public enum Pattern
  101. {
  102. Automatic = -4105,
  103. Checker = 9,
  104. CrissCross = 16,
  105. Down = -4121,
  106. Gray16 = 17,
  107. Gray25 = -4124,
  108. Gray50 = -4125,
  109. Gray75 = -4126,
  110. Gray8 = 18,
  111. Grid = 15,
  112. Horizontal = -4128,
  113. LightDown = 13,
  114. LightHorizontal = 11,
  115. LightUp = 14,
  116. LightVertical = 12,
  117. None = -4142,
  118. SemiGray75 = 10,
  119. Solid = 1,
  120. Up = -4162,
  121. Vertical = -4166
  122. }
  123. #endregion
  124. #region ColorIndex 常用颜色定义,对就Excel中颜色名
  125. /// <summary>
  126. /// 常用颜色定义,对就Excel中颜色名
  127. /// </summary>
  128. public enum ColorIndex
  129. {
  130. None = -4142,
  131. Auto = -4105,
  132. Black = 1,
  133. Brown = 53,
  134. Olive = 52,
  135. DeepLime = 51,
  136. DeepGreen = 49,
  137. DeepBlue = 11,
  138. DarkBlue = 55,
  139. Gray80 = 56,
  140. DeepRed = 9,
  141. Orange = 46,
  142. DeepOrange = 12,
  143. Green = 10,
  144. Lime = 14,
  145. Blue = 5,
  146. BlueGray = 47,
  147. Gray50 = 16,
  148. Red = 3,
  149. LightOrange = 45,
  150. SliverOrange = 43,
  151. SeaGreen = 50,
  152. WaterGreen = 42,
  153. LittleBlue = 41,
  154. Violet = 13,
  155. Gray40 = 48,
  156. Pink = 7,
  157. Golden = 44,
  158. Yellow = 6,
  159. SpringGreen = 4,
  160. LimeGreen = 8,
  161. SkyBlue = 33,
  162. Crimson = 54,
  163. Gray25 = 15,
  164. Rose = 38,
  165. Tea = 40,
  166. LightYellow = 36,
  167. LightGreen = 35,
  168. LightLimeGreen = 34,
  169. LightBlue = 37,
  170. lilac = 39,
  171. White = 2
  172. }
  173. #endregion
  174. }
  175. }