常量

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

  1. const (
  2. Area = "area"
  3. AreaStacked = "areaStacked"
  4. AreaPercentStacked = "areaPercentStacked"
  5. Area3D = "area3D"
  6. Area3DStacked = "area3DStacked"
  7. Area3DPercentStacked = "area3DPercentStacked"
  8. Bar = "bar"
  9. BarStacked = "barStacked"
  10. BarPercentStacked = "barPercentStacked"
  11. Bar3DClustered = "bar3DClustered"
  12. Bar3DStacked = "bar3DStacked"
  13. Bar3DPercentStacked = "bar3DPercentStacked"
  14. Bar3DConeClustered = "bar3DConeClustered"
  15. Bar3DConeStacked = "bar3DConeStacked"
  16. Bar3DConePercentStacked = "bar3DConePercentStacked"
  17. Bar3DPyramidClustered = "bar3DPyramidClustered"
  18. Bar3DPyramidStacked = "bar3DPyramidStacked"
  19. Bar3DPyramidPercentStacked = "bar3DPyramidPercentStacked"
  20. Bar3DCylinderClustered = "bar3DCylinderClustered"
  21. Bar3DCylinderStacked = "bar3DCylinderStacked"
  22. Bar3DCylinderPercentStacked = "bar3DCylinderPercentStacked"
  23. Col = "col"
  24. ColStacked = "colStacked"
  25. ColPercentStacked = "colPercentStacked"
  26. Col3D = "col3D"
  27. Col3DClustered = "col3DClustered"
  28. Col3DStacked = "col3DStacked"
  29. Col3DPercentStacked = "col3DPercentStacked"
  30. Col3DCone = "col3DCone"
  31. Col3DConeClustered = "col3DConeClustered"
  32. Col3DConeStacked = "col3DConeStacked"
  33. Col3DConePercentStacked = "col3DConePercentStacked"
  34. Col3DPyramid = "col3DPyramid"
  35. Col3DPyramidClustered = "col3DPyramidClustered"
  36. Col3DPyramidStacked = "col3DPyramidStacked"
  37. Col3DPyramidPercentStacked = "col3DPyramidPercentStacked"
  38. Col3DCylinder = "col3DCylinder"
  39. Col3DCylinderClustered = "col3DCylinderClustered"
  40. Col3DCylinderStacked = "col3DCylinderStacked"
  41. Col3DCylinderPercentStacked = "col3DCylinderPercentStacked"
  42. Doughnut = "doughnut"
  43. Line = "line"
  44. Pie = "pie"
  45. Pie3D = "pie3D"
  46. Radar = "radar"
  47. Scatter = "scatter"
  48. Surface3D = "surface3D"
  49. WireframeSurface3D = "wireframeSurface3D"
  50. Contour = "contour"
  51. WireframeContour = "wireframeContour"
  52. Bubble = "bubble"
  53. Bubble3D = "bubble3D"
  54. )

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

  1. const (
  2. SourceRelationship = "http://schemas.openxmlformats.org/officeDocument/2006/relationships"
  3. SourceRelationshipChart = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart"
  4. SourceRelationshipComments = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments"
  5. SourceRelationshipImage = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image"
  6. SourceRelationshipTable = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/table"
  7. SourceRelationshipDrawingML = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing"
  8. SourceRelationshipDrawingVML = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing"
  9. SourceRelationshipHyperLink = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink"
  10. SourceRelationshipWorkSheet = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet"
  11. SourceRelationshipChartsheet = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartsheet"
  12. SourceRelationshipPivotTable = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotTable"
  13. SourceRelationshipPivotCache = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition"
  14. SourceRelationshipVBAProject = "http://schemas.microsoft.com/office/2006/relationships/vbaProject"
  15. SourceRelationshipChart201506 = "http://schemas.microsoft.com/office/drawing/2015/06/chart"
  16. SourceRelationshipChart20070802 = "http://schemas.microsoft.com/office/drawing/2007/8/2/chart"
  17. SourceRelationshipChart2014 = "http://schemas.microsoft.com/office/drawing/2014/chart"
  18. SourceRelationshipCompatibility = "http://schemas.openxmlformats.org/markup-compatibility/2006"
  19. NameSpaceDrawingML = "http://schemas.openxmlformats.org/drawingml/2006/main"
  20. NameSpaceDrawingMLChart = "http://schemas.openxmlformats.org/drawingml/2006/chart"
  21. NameSpaceDrawingMLSpreadSheet = "http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing"
  22. NameSpaceSpreadSheet = "http://schemas.openxmlformats.org/spreadsheetml/2006/main"
  23. NameSpaceSpreadSheetX14 = "http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"
  24. NameSpaceSpreadSheetX15 = "http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"
  25. NameSpaceSpreadSheetExcel2006Main = "http://schemas.microsoft.com/office/excel/2006/main"
  26. NameSpaceMacExcel2008Main = "http://schemas.microsoft.com/office/mac/excel/2008/main"
  27. NameSpaceXML = "http://www.w3.org/XML/1998/namespace"
  28. NameSpaceXMLSchemaInstance = "http://www.w3.org/2001/XMLSchema-instance"
  29. StrictSourceRelationship = "http://purl.oclc.org/ooxml/officeDocument/relationships"
  30. StrictSourceRelationshipChart = "http://purl.oclc.org/ooxml/officeDocument/relationships/chart"
  31. StrictSourceRelationshipComments = "http://purl.oclc.org/ooxml/officeDocument/relationships/comments"
  32. StrictSourceRelationshipImage = "http://purl.oclc.org/ooxml/officeDocument/relationships/image"
  33. StrictNameSpaceSpreadSheet = "http://purl.oclc.org/ooxml/spreadsheetml/main"
  34. NameSpaceDublinCore = "http://purl.org/dc/elements/1.1/"
  35. NameSpaceDublinCoreTerms = "http://purl.org/dc/terms/"
  36. NameSpaceDublinCoreMetadataIntiative = "http://purl.org/dc/dcmitype/"
  37. ContentTypeDrawing = "application/vnd.openxmlformats-officedocument.drawing+xml"
  38. ContentTypeDrawingML = "application/vnd.openxmlformats-officedocument.drawingml.chart+xml"
  39. ContentTypeMacro = "application/vnd.ms-excel.sheet.macroEnabled.main+xml"
  40. ContentTypeSpreadSheetMLChartsheet = "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml"
  41. ContentTypeSpreadSheetMLComments = "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml"
  42. ContentTypeSpreadSheetMLPivotCacheDefinition = "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml"
  43. ContentTypeSpreadSheetMLPivotTable = "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml"
  44. ContentTypeSpreadSheetMLTable = "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"
  45. ContentTypeSpreadSheetMLWorksheet = "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"
  46. ContentTypeVBA = "application/vnd.ms-office.vbaProject"
  47. ContentTypeVML = "application/vnd.openxmlformats-officedocument.vmlDrawing"
  48. // ExtURIConditionalFormattings is the extLst child element
  49. // ([ISO/IEC29500-1:2016] section 18.2.10) of the worksheet element
  50. // ([ISO/IEC29500-1:2016] section 18.3.1.99) is extended by the addition of
  51. // new child ext elements ([ISO/IEC29500-1:2016] section 18.2.7)
  52. ExtURIConditionalFormattings = "{78C0D931-6437-407D-A8EE-F0AAD7539E65}"
  53. ExtURIDataValidations = "{CCE6A557-97BC-4B89-ADB6-D9C93CAAB3DF}"
  54. ExtURISparklineGroups = "{05C60535-1F16-4fd2-B633-F4F36F0B64E0}"
  55. ExtURISlicerListX14 = "{A8765BA9-456A-4DAB-B4F3-ACF838C121DE}"
  56. ExtURISlicerCachesListX14 = "{BBE1A952-AA13-448e-AADC-164F8A28A991}"
  57. ExtURISlicerListX15 = "{3A4CF648-6AED-40f4-86FF-DC5316D8AED3}"
  58. ExtURIProtectedRanges = "{FC87AEE6-9EDD-4A0A-B7FB-166176984837}"
  59. ExtURIIgnoredErrors = "{01252117-D84E-4E92-8308-4BE1C098FCBB}"
  60. ExtURIWebExtensions = "{F7C9EE02-42E1-4005-9D12-6889AFFD525C}"
  61. ExtURITimelineRefs = "{7E03D99C-DC04-49d9-9315-930204A7B6E9}"
  62. ExtURIDrawingBlip = "{28A0092B-C50C-407E-A947-70E740481C1C}"
  63. ExtURIMacExcelMX = "{64002731-A6B0-56B0-2670-7721B7C09600}"
  64. )

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

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

下面的常量定义了 XML 文档中的独立声明:

  1. const XMLHeader = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n"

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

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

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

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