1 Star 0 Fork 0

jackytse / tabtoy

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
tabfile.go 755 Bytes
一键复制 编辑 原始数据 按行查看 历史
黑色灵猫 提交于 2019-06-05 10:18 . 处理数据导出
package helper
type TableFile interface {
Load(filename string) error
// 保存到文件
Save(filename string) error
// 获取所有表单
Sheets() []TableSheet
}
type ValueOption struct {
ValueAsFloat bool
}
type TableSheet interface {
// 表单名称
Name() string
// 从表单指定单元格获取值
GetValue(row, col int, opt *ValueOption) string
// 最大列
MaxColumn() int
// 写入一行数据
WriteRow(valueList ...string)
// 检测本行是否全空(结束)
IsFullRowEmpty(row int) bool
}
func ReadSheetRow(sheet TableSheet, row int) (ret []string) {
ret = make([]string, sheet.MaxColumn())
for col := 0; col < sheet.MaxColumn(); col++ {
value := sheet.GetValue(row, col, nil)
ret[col] = value
}
return
}
Go
1
https://gitee.com/jackytse/tabtoy.git
git@gitee.com:jackytse/tabtoy.git
jackytse
tabtoy
tabtoy
v0.1.0

搜索帮助