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 Margin
- func (c *Margin) GetBottom() int
- func (c *Margin) GetLeft() int
- func (c *Margin) GetRight() int
- func (c *Margin) GetTop() int
- func (c *Margin) GetXmlBytes() ([]byte, error)
- func (c *Margin) SetBottom(bottom int) *Margin
- func (c *Margin) SetGroup(topAndBottom int, leftAndRight int) *Margin
- func (c *Margin) SetLeft(left int) *Margin
- func (c *Margin) SetMargin(margin int) *Margin
- func (c *Margin) SetRight(right int) *Margin
- func (c *Margin) SetTop(top int) *Margin
- type TcPr
- func (t *TcPr) GetBackground() *Background
- func (t *TcPr) GetBorder() *BorderManager
- func (t *TcPr) GetMargin() *Margin
- func (t *TcPr) GetWidth() int
- func (t *TcPr) GetXmlBytes() ([]byte, error)
- func (t *TcPr) SetGridSpan(span int) *TcPr
- func (t *TcPr) SetNoWrap(noWrap bool) *TcPr
- func (t *TcPr) SetTcFitText(fit bool) *TcPr
- func (t *TcPr) SetVMerge(merge VMergeType) *TcPr
- func (t *TcPr) SetWidth(width int) *TcPr
- type VMergeType
Constants ¶
View Source
const ( // VMergeTypeRestart 重新开始一组垂直合并 VMergeTypeRestart = VMergeType("restart") // VMergeTypeContinue 继续之前的合并 VMergeTypeContinue = VMergeType("continue") )
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 边框管理器 TODO: 未实现 tl2br(左上到右下斜线)以及tr2bl(左下到右上斜线)两个样式
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 Margin ¶
type Margin struct {
// contains filtered or unexported fields
}
Margin 单元格边距管理器
func (*Margin) GetXmlBytes ¶
type TcPr ¶
type TcPr struct {
// contains filtered or unexported fields
}
TcPr 单元格属性配置
func (*TcPr) GetXmlBytes ¶
type VMergeType ¶
type VMergeType string
Click to show internal directories.
Click to hide internal directories.