Documentation ¶
Index ¶
Constants ¶
View Source
const ( AppRelationshipType = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" AppContentType = "application/vnd.openxmlformats-officedocument.extended-properties+xml" )
View Source
const ( CoreRelationshipType = "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" CoreContentType = "application/vnd.openxmlformats-package.core-properties+xml" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContentType ¶
type ContentType struct { XMLName xml.Name `xml:"Types"` RootNamespace string `xml:"xmlns,attr"` Defaults []Default Overrides []Override // contains filtered or unexported fields }
func NewContentType ¶
func NewContentType() *ContentType
func (*ContentType) AddDefault ¶
func (c *ContentType) AddDefault(d Default) *ContentType
func (*ContentType) AddOverride ¶
func (c *ContentType) AddOverride(o Override) *ContentType
func (*ContentType) Filepath ¶
func (c *ContentType) Filepath() string
func (*ContentType) Marshal ¶
func (c *ContentType) Marshal() ([]byte, error)
type DocPropsApp ¶
type DocPropsApp struct { XMLName xml.Name `xml:"Properties"` RootNamespace string `xml:"xmlns,attr"` Application string `xml:"Application"` DocSecurity int `xml:"DocSecurity"` AppVersion string `xml:"AppVersion"` }
func NewDocPropsApp ¶
func NewDocPropsApp() *DocPropsApp
func (*DocPropsApp) Filepath ¶
func (d *DocPropsApp) Filepath() string
func (*DocPropsApp) Marshal ¶
func (d *DocPropsApp) Marshal() ([]byte, error)
type DocPropsCore ¶
type DocPropsCore struct { XMLName xml.Name `xml:"cp:coreProperties"` CpNamespace string `xml:"xmlns:cp,attr"` DcNamespace string `xml:"xmlns:dc,attr"` DctNamespace string `xml:"xmlns:dcterms,attr"` XsiNamespace string `xml:"xmlns:xsi,attr"` Creator string `xml:"dc:creator"` LastModify string `xml:"cp:lastModifiedBy"` Created DocPropsCoreCreated Modified DocPropsCoreModified }
func NewDocPropsCore ¶
func NewDocPropsCore() *DocPropsCore
func (*DocPropsCore) Filepath ¶
func (d *DocPropsCore) Filepath() string
func (*DocPropsCore) Marshal ¶
func (d *DocPropsCore) Marshal() ([]byte, error)
func (*DocPropsCore) SetTime ¶
func (d *DocPropsCore) SetTime(t time.Time) *DocPropsCore
func (*DocPropsCore) SetUsername ¶
func (d *DocPropsCore) SetUsername(user string) *DocPropsCore
type DocPropsCoreCreated ¶
type DocPropsCoreModified ¶
type Document ¶
type Document struct {
// contains filtered or unexported fields
}
Document xlsx文档
func (*Document) GetWorkbook ¶
func (*Document) NewSheetWithName ¶
NewSheetWithName 代理 Workbook.NewSheetWithName 方法
func (*Document) SetDocumentUser ¶
type Override ¶
type Override struct { XMLName xml.Name `xml:"Override"` // PartName 单元名称 PartName string `xml:"PartName,attr"` // ContentType Type类型 ContentType string `xml:"ContentType,attr"` }
Override Override结构定义
type Relationship ¶
type Relationship struct { XMLName xml.Name `xml:"Relationship"` // Id 关联的id Id string `xml:"Id,attr"` // Type 关联类型 Type string `xml:"Type,attr"` // Target 目标位置 Target string `xml:"Target,attr"` }
Relationship 关联结构定义
type RootRelationship ¶
type RootRelationship struct { XMLName xml.Name `xml:"Relationships"` RootNamespace string `xml:"xmlns,attr"` Relationships []Relationship // contains filtered or unexported fields }
func NewRootRelationship ¶
func NewRootRelationship() *RootRelationship
func (*RootRelationship) AddRelationship ¶
func (r *RootRelationship) AddRelationship(rel Relationship) *RootRelationship
func (*RootRelationship) Filepath ¶
func (r *RootRelationship) Filepath() string
func (*RootRelationship) Marshal ¶
func (r *RootRelationship) Marshal() ([]byte, error)
func (*RootRelationship) NextRId ¶
func (r *RootRelationship) NextRId() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.