Documentation ¶
Index ¶
Constants ¶
View Source
const ( //无线型 NONE = iota //细实线 LightLine //粗实线 HeavyLine //虚线 ImaginaryLine //点线 DottedLine )
Border line
View Source
const ( //黑色 Black = "000000" //红色 Red = "FF0000" //绿色 Green = "00FF00" //蓝色 Blue = "0000FF" //浅蓝色 LightBlue = "BDD7EE" //浅黄色 LightYellow = "FFF68F" //浅灰色 LightGray = "E8E8E8" //西红柿色 Tomato = "EE5C42" )
Color 采用RGB格式
View Source
const ( NoneFill = iota PureFill )
填充, 纯色或不填充
Variables ¶
This section is empty.
Functions ¶
func GetIncAxis ¶
GetIncAxis 根据start坐标,获取增加step后的坐标, 默认返回的是增加step行,将coldir选中为true,则是返回增加step列
Types ¶
type SheetStyle ¶
SheetStyle ....
func (*SheetStyle) AssignStyle ¶
func (my *SheetStyle) AssignStyle(axis *[][2]string, merge bool, p interface{})
AssignStyle 分配样式
func (*SheetStyle) SetCellDim ¶
func (my *SheetStyle) SetCellDim(st, ed string, w, h float64) error
SetCellDim ...
type SheetWrite ¶
type SheetWrite struct { Name string GlobalData map[string]interface{} //全局的一些配置信息 Data []*MapRowData //需要写入的数据块 Mother *Workbook *sync.RWMutex //并发控制 }
SheetWrite 写数据工作页
func (*SheetWrite) GetAxisForStyle ¶
func (my *SheetWrite) GetAxisForStyle(src [][2]string, target string, step int, col ...bool) [][2]string
GetAxisForStyle 设置统一的坐标
type Workbook ¶
type Workbook struct { *excelize.File //文件,考虑到要使用原来的一些方法 SheetNames []string //工作簿的所有sheet名字集 Path string //工作簿的路径 *sync.WaitGroup *sync.RWMutex }
Workbook 工作簿信息
func (*Workbook) NewMulWriteBuffer ¶
func (my *Workbook) NewMulWriteBuffer() []*SheetWrite
NewMulWriteBuffer 新建(整个工作簿)多张写表的buffers tip:可以将sheet名设置为索引常量,例如const Sheet1 = 0,这样也可以清楚知道自己在操作哪张表
func (*Workbook) NewOneWriteBuffer ¶
func (my *Workbook) NewOneWriteBuffer(sheetName ...string) *SheetWrite
NewOneWriteBuffer 新建一个写表的buffer 若是提供sheet名,则返回该sheetbuffer 若没有或提供表名错误,则返回workbook的第一张表buffer
func (*Workbook) OpenStyleSetting ¶
func (my *Workbook) OpenStyleSetting(name string) *SheetStyle
OpenStyleSetting ..打开一个样式设置起
Click to show internal directories.
Click to hide internal directories.