Documentation ¶
Index ¶
- Constants
- type Background
- func (b *Background) GetBackgroundColor() string
- func (b *Background) GetColor() string
- func (b *Background) GetXmlBytes() ([]byte, error)
- func (b *Background) SetBackgroundColor(color string) *Background
- func (b *Background) SetColor(color string) *Background
- func (b *Background) SetMask(val string) *Background
- type Border
- type BorderManager
- func (b *BorderManager) GetXmlBytes() ([]byte, error)
- func (b *BorderManager) SetBorder(style BorderStyle, color string, size uint8, space uint, shadow bool) *BorderManager
- func (b *BorderManager) SetBottom(style BorderStyle, color string, size uint8, space uint, shadow bool) *BorderManager
- func (b *BorderManager) SetInsideHorizontal(style BorderStyle, color string, size uint8, space uint, shadow bool) *BorderManager
- func (b *BorderManager) SetInsideVertical(style BorderStyle, color string, size uint8, space uint, shadow bool) *BorderManager
- func (b *BorderManager) SetLeft(style BorderStyle, color string, size uint8, space uint, shadow bool) *BorderManager
- func (b *BorderManager) SetRight(style BorderStyle, color string, size uint8, space uint, shadow bool) *BorderManager
- func (b *BorderManager) SetTop(style BorderStyle, color string, size uint8, space uint, shadow bool) *BorderManager
- type BorderStyle
- type Cell
- type CellMargin
- func (c *CellMargin) GetBottom() int
- func (c *CellMargin) GetLeft() int
- func (c *CellMargin) GetRight() int
- func (c *CellMargin) GetTop() int
- func (c *CellMargin) GetXmlBytes() ([]byte, error)
- func (c *CellMargin) SetBottom(bottom int) *CellMargin
- func (c *CellMargin) SetGroup(topAndBottom int, LeftAndRight int) *CellMargin
- func (c *CellMargin) SetLeft(left int) *CellMargin
- func (c *CellMargin) SetMargin(margin int) *CellMargin
- func (c *CellMargin) SetRight(right int) *CellMargin
- func (c *CellMargin) SetTop(top int) *CellMargin
- type Content
- type ContentType
- type GridCol
- type HorizontalAlignmentType
- type LayoutType
- type Row
- type Table
- func (t *Table) AddCol() *GridCol
- func (t *Table) AddColWithIndexAndWidth(index int, width int) *GridCol
- func (t *Table) AddColWithWidth(width int) *GridCol
- func (t *Table) AddRow() *Row
- func (t *Table) AddRowWithIndex(index uint) *Row
- func (t *Table) GetCol(index int) (*GridCol, error)
- func (t *Table) GetCols() []*GridCol
- func (t *Table) GetProperties() *TblPr
- func (t *Table) GetRow(index uint) (*Row, error)
- func (t *Table) GetRows() []*Row
- func (t *Table) GetXmlBytes() ([]byte, error)
- type TblPr
- func (t *TblPr) GetBorder() *BorderManager
- func (t *TblPr) GetCellMargin() *CellMargin
- func (t *TblPr) GetExtraXmlBytes() ([]byte, error)
- func (t *TblPr) GetId() string
- func (t *TblPr) GetInnerXmlBytes() ([]byte, error)
- func (t *TblPr) GetWidth() int
- func (t *TblPr) SetCaption(caption string) *TblPr
- func (t *TblPr) SetCellSpacing(spacing int) *TblPr
- func (t *TblPr) SetHorizontalAlignment(horizontalAlignment HorizontalAlignmentType) *TblPr
- func (t *TblPr) SetIndentation(indentation int) *TblPr
- func (t *TblPr) SetLayout(layout LayoutType) *TblPr
- func (t *TblPr) SetWidth(width int) *TblPr
- func (t *TblPr) SetWidthAuto() *TblPr
Constants ¶
View Source
const ( ContentTypeParagraph = ContentType("paragraph") ContentTypeTable = ContentType("table") )
View Source
const ( // HorizontalAlignmentStart // 表格以文本段的左侧沿线对齐 HorizontalAlignmentStart = HorizontalAlignmentType("left") // HorizontalAlignmentEnd // 表格以文本段的右侧沿线对齐 HorizontalAlignmentEnd = HorizontalAlignmentType("right") // HorizontalAlignmentCenter // 表格以文本段的居中位置显示 HorizontalAlignmentCenter = HorizontalAlignmentType("center") )
View Source
const ( // LayoutTypeFixed // 表示表格的单元格布局固定,不会自动调整单元格宽高 LayoutTypeFixed = LayoutType("fixed") // LayoutTypeAuto // 表示单元格宽高自动处理 LayoutTypeAuto = LayoutType("autofit") )
View Source
const ( BorderStyleNil = BorderStyle("nil") BorderStyleNone = BorderStyle("none") BorderStyleSingle = BorderStyle("single") BorderStyleDashDotStroked = BorderStyle("dashDotStroked") BorderStyleDashed = BorderStyle("dashed") BorderStyleDashSmallGap = BorderStyle("dashSmallGap") BorderStyleDotDash = BorderStyle("dotDash") BorderStyleDotDotDash = BorderStyle("dotDotDash") BorderStyleDotted = BorderStyle("dotted") BorderStyleDouble = BorderStyle("double") BorderStyleDoubleWave = BorderStyle("doubleWave") BorderStyleInset = BorderStyle("inset") BorderStyleOutset = BorderStyle("outset") BorderStyleThick = BorderStyle("thick") BorderStyleThickThinLargeGap = BorderStyle("thickThinLargeGap") BorderStyleThickThinMediumGap = BorderStyle("thickThinMediumGap") BorderStyleThickThinSmallGap = BorderStyle("thickThinSmallGap") BorderStyleThinThickLargeGap = BorderStyle("thinThickLargeGap") BorderStyleThinThickMediumGap = BorderStyle("thinThickMediumGap") BorderStyleThinThickSmallGap = BorderStyle("thinThickSmallGap") BorderStyleThinThickThinLargeGap = BorderStyle("thinThickThinLargeGap") BorderStyleThinThickThinMediumGap = BorderStyle("thinThickThinMediumGap") BorderStyleThinThickThinSmallGap = BorderStyle("thinThickThinSmallGap") BorderStyleThreeDEmboss = BorderStyle("threeDEmboss") BorderStyleThreeDEngrave = BorderStyle("threeDEngrave") BorderStyleTriple = BorderStyle("triple") BorderStyleWave = BorderStyle("wave") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Background ¶
type Background struct {
// contains filtered or unexported fields
}
Background 背景配置结构
func (*Background) GetBackgroundColor ¶
func (b *Background) GetBackgroundColor() string
GetBackgroundColor 获取背景色
func (*Background) GetXmlBytes ¶
func (b *Background) GetXmlBytes() ([]byte, error)
func (*Background) SetBackgroundColor ¶
func (b *Background) SetBackgroundColor(color string) *Background
SetBackgroundColor 设置背景色,不包含#号
func (*Background) SetColor ¶
func (b *Background) SetColor(color string) *Background
SetColor 设置前景色,不包含#号
type Border ¶
type Border struct { // Color 颜色值,以十六进制字符串设置,不包含#号,例如FF0000 Color string // Shadow 是否显示阴影 Shadow bool // Space 间距偏移量,以磅(1/72英寸)为单位 Space uint // Size 边框宽度 // 最小值是2,最大值是96 Size uint8 // Style 边框样式 // 段落边框只能是线条边框 Style BorderStyle }
Border 边框结构定义
type BorderManager ¶
type BorderManager struct {
// contains filtered or unexported fields
}
BorderManager 边框管理器
func (*BorderManager) GetXmlBytes ¶
func (b *BorderManager) GetXmlBytes() ([]byte, error)
func (*BorderManager) SetBorder ¶
func (b *BorderManager) SetBorder(style BorderStyle, color string, size uint8, space uint, shadow bool) *BorderManager
SetBorder 统一设置边框样式
func (*BorderManager) SetBottom ¶
func (b *BorderManager) SetBottom(style BorderStyle, color string, size uint8, space uint, shadow bool) *BorderManager
SetBottom 设置底部边框
func (*BorderManager) SetInsideHorizontal ¶
func (b *BorderManager) SetInsideHorizontal(style BorderStyle, color string, size uint8, space uint, shadow bool) *BorderManager
SetInsideHorizontal 设置表格内行间边框
func (*BorderManager) SetInsideVertical ¶
func (b *BorderManager) SetInsideVertical(style BorderStyle, color string, size uint8, space uint, shadow bool) *BorderManager
SetInsideVertical 设置表格内列间边框
func (*BorderManager) SetLeft ¶
func (b *BorderManager) SetLeft(style BorderStyle, color string, size uint8, space uint, shadow bool) *BorderManager
SetLeft 设置左侧边框
func (*BorderManager) SetRight ¶
func (b *BorderManager) SetRight(style BorderStyle, color string, size uint8, space uint, shadow bool) *BorderManager
SetRight 设置右侧边框
func (*BorderManager) SetTop ¶
func (b *BorderManager) SetTop(style BorderStyle, color string, size uint8, space uint, shadow bool) *BorderManager
SetTop 设置顶部边框
type BorderStyle ¶
type BorderStyle string
type Cell ¶
type Cell struct {
// contains filtered or unexported fields
}
Cell 表格单元格结构定义
func (*Cell) GetXmlBytes ¶
type CellMargin ¶
type CellMargin struct {
// contains filtered or unexported fields
}
CellMargin 单元格边距管理器
func (*CellMargin) GetXmlBytes ¶
func (c *CellMargin) GetXmlBytes() ([]byte, error)
func (*CellMargin) SetBottom ¶
func (c *CellMargin) SetBottom(bottom int) *CellMargin
SetBottom 设置下边距
func (*CellMargin) SetGroup ¶
func (c *CellMargin) SetGroup(topAndBottom int, LeftAndRight int) *CellMargin
SetGroup 分组设置边距
func (*CellMargin) SetMargin ¶
func (c *CellMargin) SetMargin(margin int) *CellMargin
SetMargin 设置全部边距
type ContentType ¶
type ContentType string
type GridCol ¶
type GridCol struct {
// contains filtered or unexported fields
}
GridCol 表格列定义
func (*GridCol) GetXmlBytes ¶
type HorizontalAlignmentType ¶
type HorizontalAlignmentType string
type LayoutType ¶
type LayoutType string
type Row ¶
type Row struct {
// contains filtered or unexported fields
}
Row 表格行结构定义
func (*Row) AddCellText ¶
AddCellText 添加指定数量单元格的文本内容
func (*Row) GetXmlBytes ¶
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
Table 表格结构定义
func (*Table) AddColWithIndexAndWidth ¶
AddColWithIndexAndWidth 添加一列并指定位置及宽度
func (*Table) AddColWithWidth ¶
AddColWithWidth 添加一列并设置列宽
func (*Table) AddRowWithIndex ¶
AddRowWithIndex 添加一行到指定位置
func (*Table) GetXmlBytes ¶
type TblPr ¶
type TblPr struct {
// contains filtered or unexported fields
}
TblPr 表格属性配置
func (*TblPr) GetExtraXmlBytes ¶
GetExtraXmlBytes 获取外部样式
func (*TblPr) GetInnerXmlBytes ¶
GetInnerXmlBytes 获取内联样式
func (*TblPr) SetCellSpacing ¶
SetCellSpacing 设置单元格间距
func (*TblPr) SetHorizontalAlignment ¶
func (t *TblPr) SetHorizontalAlignment(horizontalAlignment HorizontalAlignmentType) *TblPr
SetHorizontalAlignment 设置水平对齐
func (*TblPr) SetIndentation ¶
SetIndentation 设置缩进
Source Files ¶
Click to show internal directories.
Click to hide internal directories.