常量

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

    1. SourceRelationshipChart = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart"
    2. SourceRelationshipComments = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments"
    3. SourceRelationshipImage = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image"
    4. SourceRelationshipTable = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/table"
    5. SourceRelationshipDrawingML = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing"
    6. SourceRelationshipDrawingVML = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing"
    7. SourceRelationshipHyperLink = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink"
    8. SourceRelationshipWorkSheet = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet"
    9. SourceRelationshipChartsheet = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartsheet"
    10. SourceRelationshipDialogsheet = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/dialogsheet"
    11. SourceRelationshipPivotTable = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotTable"
    12. SourceRelationshipPivotCache = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition"
    13. SourceRelationshipSharedStrings = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings"
    14. SourceRelationshipVBAProject = "http://schemas.microsoft.com/office/2006/relationships/vbaProject"
    15. NameSpaceXML = "http://www.w3.org/XML/1998/namespace"
    16. NameSpaceXMLSchemaInstance = "http://www.w3.org/2001/XMLSchema-instance"
    17. StrictSourceRelationship = "http://purl.oclc.org/ooxml/officeDocument/relationships"
    18. StrictSourceRelationshipChart = "http://purl.oclc.org/ooxml/officeDocument/relationships/chart"
    19. StrictSourceRelationshipComments = "http://purl.oclc.org/ooxml/officeDocument/relationships/comments"
    20. StrictSourceRelationshipImage = "http://purl.oclc.org/ooxml/officeDocument/relationships/image"
    21. StrictNameSpaceSpreadSheet = "http://purl.oclc.org/ooxml/spreadsheetml/main"
    22. NameSpaceDublinCore = "http://purl.org/dc/elements/1.1/"
    23. ContentTypeDrawing = "application/vnd.openxmlformats-officedocument.drawing+xml"
    24. ContentTypeDrawingML = "application/vnd.openxmlformats-officedocument.drawingml.chart+xml"
    25. ContentTypeMacro = "application/vnd.ms-excel.sheet.macroEnabled.main+xml"
    26. ContentTypeSpreadSheetMLChartsheet = "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml"
    27. ContentTypeSpreadSheetMLComments = "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml"
    28. ContentTypeSpreadSheetMLPivotCacheDefinition = "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml"
    29. ContentTypeSpreadSheetMLPivotTable = "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml"
    30. ContentTypeSpreadSheetMLSharedStrings = "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"
    31. ContentTypeSpreadSheetMLTable = "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"
    32. ContentTypeSpreadSheetMLWorksheet = "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"
    33. ContentTypeVBA = "application/vnd.ms-office.vbaProject"
    34. ContentTypeVML = "application/vnd.openxmlformats-officedocument.vmlDrawing"
    35. // ExtURIConditionalFormattings is the extLst child element
    36. // ([ISO/IEC29500-1:2016] section 18.2.10) of the worksheet element
    37. // ([ISO/IEC29500-1:2016] section 18.3.1.99) is extended by the addition of
    38. // new child ext elements ([ISO/IEC29500-1:2016] section 18.2.7)
    39. ExtURIConditionalFormattings = "{78C0D931-6437-407D-A8EE-F0AAD7539E65}"
    40. ExtURIDataValidations = "{CCE6A557-97BC-4B89-ADB6-D9C93CAAB3DF}"
    41. ExtURISparklineGroups = "{05C60535-1F16-4fd2-B633-F4F36F0B64E0}"
    42. ExtURISlicerListX14 = "{A8765BA9-456A-4DAB-B4F3-ACF838C121DE}"
    43. ExtURISlicerCachesListX14 = "{BBE1A952-AA13-448e-AADC-164F8A28A991}"
    44. ExtURISlicerListX15 = "{3A4CF648-6AED-40f4-86FF-DC5316D8AED3}"
    45. ExtURIWebExtensions = "{F7C9EE02-42E1-4005-9D12-6889AFFD525C}"
    46. ExtURITimelineRefs = "{7E03D99C-DC04-49d9-9315-930204A7B6E9}"
    47. ExtURIDrawingBlip = "{28A0092B-C50C-407E-A947-70E740481C1C}"
    48. ExtURIMacExcelMX = "{64002731-A6B0-56B0-2670-7721B7C09600}"
    49. )

    下面的常量定义了 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. )

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

    1. const (
    2. CellTypeUnset CellType = iota
    3. CellTypeBool
    4. CellTypeDate
    5. CellTypeError
    6. CellTypeNumber