常量

《Excelize 权威指南》图书出版,网上购买方式:人民邮电出版社 |异步社区 |天猫 |京东 |当当 |微店 |抖音 |拼多多

CultureName 是受支持的区域格式类型定义。

  1. type CultureName byte

部分单元格数字格式受到操作系统特定的区域日期和时间设置的影响,以下这些常量定义了当前支持的区域格式类型枚举:

  1. const (
  2. CultureNameUnknown CultureName = iota
  3. CultureNameEnUS
  4. CultureNameZhCN
  5. )

ChartType 是受支持的图表类型定义。

  1. type ChartType byte

以下这些常量定义了当前支持的图表类型枚举:

  1. const (
  2. Area ChartType = iota
  3. AreaStacked
  4. AreaPercentStacked
  5. Area3D
  6. Area3DStacked
  7. Area3DPercentStacked
  8. Bar
  9. BarStacked
  10. BarPercentStacked
  11. Bar3DClustered
  12. Bar3DStacked
  13. Bar3DPercentStacked
  14. Bar3DConeClustered
  15. Bar3DConeStacked
  16. Bar3DConePercentStacked
  17. Bar3DPyramidClustered
  18. Bar3DPyramidStacked
  19. Bar3DPyramidPercentStacked
  20. Bar3DCylinderClustered
  21. Bar3DCylinderStacked
  22. Bar3DCylinderPercentStacked
  23. Col
  24. ColStacked
  25. ColPercentStacked
  26. Col3D
  27. Col3DClustered
  28. Col3DStacked
  29. Col3DPercentStacked
  30. Col3DCone
  31. Col3DConeClustered
  32. Col3DConeStacked
  33. Col3DConePercentStacked
  34. Col3DPyramid
  35. Col3DPyramidClustered
  36. Col3DPyramidStacked
  37. Col3DPyramidPercentStacked
  38. Col3DCylinder
  39. Col3DCylinderClustered
  40. Col3DCylinderStacked
  41. Col3DCylinderPercentStacked
  42. Doughnut
  43. Line
  44. Line3D
  45. Pie
  46. Pie3D
  47. PieOfPie
  48. BarOfPie
  49. Radar
  50. Scatter
  51. Surface3D
  52. WireframeSurface3D
  53. Contour
  54. WireframeContour
  55. Bubble
  56. Bubble3D
  57. )

以下这些常量定义了 XML 标签的命名空间:

  1. const (
  2. ContentTypeAddinMacro = "application/vnd.ms-excel.addin.macroEnabled.main+xml"
  3. ContentTypeDrawing = "application/vnd.openxmlformats-officedocument.drawing+xml"
  4. ContentTypeDrawingML = "application/vnd.openxmlformats-officedocument.drawingml.chart+xml"
  5. ContentTypeMacro = "application/vnd.ms-excel.sheet.macroEnabled.main+xml"
  6. ContentTypeRelationships = "application/vnd.openxmlformats-package.relationships+xml"
  7. ContentTypeSheetML = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"
  8. ContentTypeSlicer = "application/vnd.ms-excel.slicer+xml"
  9. ContentTypeSlicerCache = "application/vnd.ms-excel.slicerCache+xml"
  10. ContentTypeSpreadSheetMLChartsheet = "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml"
  11. ContentTypeSpreadSheetMLComments = "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml"
  12. ContentTypeSpreadSheetMLPivotCacheDefinition = "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml"
  13. ContentTypeSpreadSheetMLPivotTable = "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml"
  14. ContentTypeSpreadSheetMLSharedStrings = "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"
  15. ContentTypeSpreadSheetMLTable = "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"
  16. ContentTypeSpreadSheetMLWorksheet = "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"
  17. ContentTypeTemplate = "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml"
  18. ContentTypeTemplateMacro = "application/vnd.ms-excel.template.macroEnabled.main+xml"
  19. ContentTypeVBA = "application/vnd.ms-office.vbaProject"
  20. ContentTypeVML = "application/vnd.openxmlformats-officedocument.vmlDrawing"
  21. NameSpaceDrawingMLMain = "http://schemas.openxmlformats.org/drawingml/2006/main"
  22. NameSpaceDublinCore = "http://purl.org/dc/elements/1.1/"
  23. NameSpaceDublinCoreMetadataInitiative = "http://purl.org/dc/dcmitype/"
  24. NameSpaceDublinCoreTerms = "http://purl.org/dc/terms/"
  25. NameSpaceExtendedProperties = "http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"
  26. NameSpaceXML = "http://www.w3.org/XML/1998/namespace"
  27. NameSpaceXMLSchemaInstance = "http://www.w3.org/2001/XMLSchema-instance"
  28. SourceRelationshipChart = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart"
  29. SourceRelationshipChartsheet = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartsheet"
  30. SourceRelationshipComments = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments"
  31. SourceRelationshipDialogsheet = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/dialogsheet"
  32. SourceRelationshipDrawingML = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing"
  33. SourceRelationshipDrawingVML = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing"
  34. SourceRelationshipExtendProperties = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties"
  35. SourceRelationshipHyperLink = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink"
  36. SourceRelationshipImage = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image"
  37. SourceRelationshipOfficeDocument = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument"
  38. SourceRelationshipPivotCache = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition"
  39. SourceRelationshipPivotTable = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotTable"
  40. SourceRelationshipSharedStrings = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings"
  41. SourceRelationshipSlicer = "http://schemas.microsoft.com/office/2007/relationships/slicer"
  42. SourceRelationshipSlicerCache = "http://schemas.microsoft.com/office/2007/relationships/slicerCache"
  43. SourceRelationshipTable = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/table"
  44. SourceRelationshipVBAProject = "http://schemas.microsoft.com/office/2006/relationships/vbaProject"
  45. SourceRelationshipWorkSheet = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet"
  46. StrictNameSpaceDocumentPropertiesVariantTypes = "http://purl.oclc.org/ooxml/officeDocument/docPropsVTypes"
  47. StrictNameSpaceDrawingMLMain = "http://purl.oclc.org/ooxml/drawingml/main"
  48. StrictNameSpaceExtendedProperties = "http://purl.oclc.org/ooxml/officeDocument/extendedProperties"
  49. StrictNameSpaceSpreadSheet = "http://purl.oclc.org/ooxml/spreadsheetml/main"
  50. StrictSourceRelationship = "http://purl.oclc.org/ooxml/officeDocument/relationships"
  51. StrictSourceRelationshipChart = "http://purl.oclc.org/ooxml/officeDocument/relationships/chart"
  52. StrictSourceRelationshipComments = "http://purl.oclc.org/ooxml/officeDocument/relationships/comments"
  53. StrictSourceRelationshipExtendProperties = "http://purl.oclc.org/ooxml/officeDocument/relationships/extendedProperties"
  54. StrictSourceRelationshipImage = "http://purl.oclc.org/ooxml/officeDocument/relationships/image"
  55. StrictSourceRelationshipOfficeDocument = "http://purl.oclc.org/ooxml/officeDocument/relationships/officeDocument"
  56. // The following constants defined the extLst child element
  57. // ([ISO/IEC29500-1:2016] section 18.2.10) of the workbook and worksheet
  58. // elements extended by the addition of new child ext elements.
  59. ExtURICalcFeatures = "{B58B0392-4F1F-4190-BB64-5DF3571DCE5F}"
  60. ExtURIConditionalFormattingRuleID = "{B025F937-C7B1-47D3-B67F-A62EFF666E3E}"
  61. ExtURIConditionalFormattings = "{78C0D931-6437-407d-A8EE-F0AAD7539E65}"
  62. ExtURIDataField = "{E15A36E0-9728-4E99-A89B-3F7291B0FE68}"
  63. ExtURIDataModel = "{FCE2AD5D-F65C-4FA6-A056-5C36A1767C68}"
  64. ExtURIDataValidations = "{CCE6A557-97BC-4b89-ADB6-D9C93CAAB3DF}"
  65. ExtURIDrawingBlip = "{28A0092B-C50C-407E-A947-70E740481C1C}"
  66. ExtURIExternalLinkPr = "{FCE6A71B-6B00-49CD-AB44-F6B1AE7CDE65}"
  67. ExtURIIgnoredErrors = "{01252117-D84E-4E92-8308-4BE1C098FCBB}"
  68. ExtURIMacExcelMX = "{64002731-A6B0-56B0-2670-7721B7C09600}"
  69. ExtURIModelTimeGroupings = "{9835A34E-60A6-4A7C-AAB8-D5F71C897F49}"
  70. ExtURIPivotCacheDefinition = "{725AE2AE-9491-48be-B2B4-4EB974FC3084}"
  71. ExtURIPivotCachesX14 = "{876F7934-8845-4945-9796-88D515C7AA90}"
  72. ExtURIPivotCachesX15 = "{841E416B-1EF1-43b6-AB56-02D37102CBD5}"
  73. ExtURIPivotField = "{2946ED86-A175-432a-8AC1-64E0C546D7DE}"
  74. ExtURIPivotFilter = "{0605FD5F-26C8-4aeb-8148-2DB25E43C511}"
  75. ExtURIPivotHierarchy = "{F1805F06-0CD304483-9156-8803C3D141DF}"
  76. ExtURIPivotTableReferences = "{983426D0-5260-488c-9760-48F4B6AC55F4}"
  77. ExtURIProtectedRanges = "{FC87AEE6-9EDD-4A0A-B7FB-166176984837}"
  78. ExtURISlicerCacheDefinition = "{2F2917AC-EB37-4324-AD4E-5DD8C200BD13}"
  79. ExtURISlicerCacheHideItemsWithNoData = "{470722E0-AACD-4C17-9CDC-17EF765DBC7E}"
  80. ExtURISlicerCachesX14 = "{BBE1A952-AA13-448e-AADC-164F8A28A991}"
  81. ExtURISlicerCachesX15 = "{46BE6895-7355-4a93-B00E-2C351335B9C9}"
  82. ExtURISlicerListX14 = "{A8765BA9-456A-4dab-B4F3-ACF838C121DE}"
  83. ExtURISlicerListX15 = "{3A4CF648-6AED-40f4-86FF-DC5316D8AED3}"
  84. ExtURISparklineGroups = "{05C60535-1F16-4fd2-B633-F4F36F0B64E0}"
  85. ExtURISVG = "{96DAC541-7B7A-43D3-8B79-37D633B846F1}"
  86. ExtURITimelineCachePivotCaches = "{A2CB5862-8E78-49c6-8D9D-AF26E26ADB89}"
  87. ExtURITimelineCacheRefs = "{D0CA8CA8-9F24-4464-BF8E-62219DCF47F9}"
  88. ExtURITimelineRefs = "{7E03D99C-DC04-49d9-9315-930204A7B6E9}"
  89. ExtURIWebExtensions = "{F7C9EE02-42E1-4005-9D12-6889AFFD525C}"
  90. ExtURIWorkbookPrX14 = "{79F54976-1DA5-4618-B147-ACDE4B953A38}"
  91. ExtURIWorkbookPrX15 = "{140A7094-0E35-4892-8432-C4D2E57EDEB5}"
  92. )

下面的常量定义了 Excel 工作表和工作簿规范与限制:

  1. const (
  2. MaxCellStyles = 65430
  3. MaxColumns = 16384
  4. MaxColumnWidth = 255
  5. MaxFieldLength = 255
  6. MaxFilePathLength = 207
  7. MaxFormControlValue = 30000
  8. MaxFontFamilyLength = 31
  9. MaxFontSize = 409
  10. MaxRowHeight = 409
  11. MaxSheetNameLength = 31
  12. MinColumns = 1
  13. MinFontSize = 1
  14. StreamChunkSize = 1 << 24
  15. TotalCellChars = 32767
  16. TotalRows = 1048576
  17. TotalSheetHyperlinks = 65529
  18. UnzipSizeLimit = 1000 << 24
  19. )

下面的常量定义了 EMU (English Metric Units) 单位:

  1. const (
  2. EMU int = 9525
  3. )

以下这些常量定义了当前支持的数据验证类型:

  1. const (
  2. DataValidationTypeCustom
  3. DataValidationTypeDate
  4. DataValidationTypeDecimal
  5. DataValidationTypeTextLength
  6. DataValidationTypeTime
  7. DataValidationTypeWhole
  8. )

以下这些常量定义了当前支持的数据验证条件:

  1. const (
  2. DataValidationOperatorBetween
  3. DataValidationOperatorEqual
  4. DataValidationOperatorGreaterThan
  5. DataValidationOperatorGreaterThanOrEqual
  6. DataValidationOperatorLessThan
  7. DataValidationOperatorLessThanOrEqual
  8. DataValidationOperatorNotBetween
  9. DataValidationOperatorNotEqual
  10. )

CellType 定义了单元格的数据类型:

  1. const (
  2. CellTypeUnset CellType = iota
  3. CellTypeBool
  4. CellTypeDate
  5. CellTypeError
  6. CellTypeFormula
  7. CellTypeInlineString
  8. CellTypeNumber
  9. CellTypeSharedString
  10. )

ColorMappingType 定义了颜色转换枚举类型:

  1. const (
  2. ColorMappingTypeLight1 ColorMappingType = iota
  3. ColorMappingTypeDark1
  4. ColorMappingTypeLight2
  5. ColorMappingTypeDark2
  6. ColorMappingTypeAccent1
  7. ColorMappingTypeAccent2
  8. ColorMappingTypeAccent3
  9. ColorMappingTypeAccent4
  10. ColorMappingTypeAccent5
  11. ColorMappingTypeAccent6
  12. ColorMappingTypeHyperlink
  13. ColorMappingTypeFollowedHyperlink
  14. ColorMappingTypeUnsetValue int = -1
  15. )