cell

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

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) GetColor

func (b *Background) GetColor() string

GetColor 获取前景色

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 设置前景色,不包含#号

func (*Background) SetMask

func (b *Background) SetMask(val string) *Background

SetMask

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) GetBottom

func (c *Margin) GetBottom() int

GetBottom

func (*Margin) GetLeft

func (c *Margin) GetLeft() int

GetLeft

func (*Margin) GetRight

func (c *Margin) GetRight() int

GetRight

func (*Margin) GetTop

func (c *Margin) GetTop() int

GetTop

func (*Margin) GetXmlBytes

func (c *Margin) GetXmlBytes() ([]byte, error)

func (*Margin) SetBottom

func (c *Margin) SetBottom(bottom int) *Margin

SetBottom 设置下边距

func (*Margin) SetGroup

func (c *Margin) SetGroup(topAndBottom int, leftAndRight int) *Margin

SetGroup 分组设置边距

func (*Margin) SetLeft

func (c *Margin) SetLeft(left int) *Margin

SetLeft 设置左边距

func (*Margin) SetMargin

func (c *Margin) SetMargin(margin int) *Margin

SetMargin 设置全部边距

func (*Margin) SetRight

func (c *Margin) SetRight(right int) *Margin

SetRight 设置右边距

func (*Margin) SetTop

func (c *Margin) SetTop(top int) *Margin

SetTop 设置上边距

type TcPr

type TcPr struct {
	// contains filtered or unexported fields
}

TcPr 单元格属性配置

func (*TcPr) GetBackground

func (t *TcPr) GetBackground() *Background

GetBackground 获取背景配置结构

func (*TcPr) GetBorder

func (t *TcPr) GetBorder() *BorderManager

GetBorder 获取边框管理器

func (*TcPr) GetMargin

func (t *TcPr) GetMargin() *Margin

GetMargin 获取边距配置

func (*TcPr) GetWidth

func (t *TcPr) GetWidth() int

GetWidth 获取单元格宽度

func (*TcPr) GetXmlBytes

func (t *TcPr) GetXmlBytes() ([]byte, error)

func (*TcPr) SetGridSpan

func (t *TcPr) SetGridSpan(span int) *TcPr

SetGridSpan 设置表格合并的列数

func (*TcPr) SetNoWrap

func (t *TcPr) SetNoWrap(noWrap bool) *TcPr

SetNoWrap 设置文本不换行

func (*TcPr) SetTcFitText

func (t *TcPr) SetTcFitText(fit bool) *TcPr

SetTcFitText 设置文本宽度自适应

func (*TcPr) SetVMerge

func (t *TcPr) SetVMerge(merge VMergeType) *TcPr

SetVMerge 设置纵向合并类型

func (*TcPr) SetWidth

func (t *TcPr) SetWidth(width int) *TcPr

SetWidth 设置单元格宽度

type VMergeType

type VMergeType string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL