Documentation ¶
Index ¶
- Constants
- func GetLog() *golog.Logger
- func Run(g *printer.Globals) bool
- type DataHeader
- func (self *DataHeader) AsymmetricEqual(other *DataHeader) (string, bool)
- func (self *DataHeader) Equal(other *DataHeader) (string, bool)
- func (self *DataHeader) FieldRepeatedCount(fd *model.FieldDescriptor) (count int)
- func (self *DataHeader) ParseProtoField(index int, sheet *Sheet, localFD *model.FileDescriptor, ...) bool
- func (self *DataHeader) RawField(index int) *model.FieldDescriptor
- func (self *DataHeader) RawFieldCount() int
- type DataHeaderElement
- type DataSheet
- type File
- func (self *File) CheckValueRepeat(fd *model.FieldDescriptor, value string) bool
- func (self *File) ExportData(dataModel *model.DataModel, parentHeader *DataHeader) bool
- func (self *File) ExportLocalType(mainFile *File) bool
- func (self *File) GlobalFileDesc() *model.FileDescriptor
- func (self *File) IsVertical() bool
- type Sheet
- type TypeSheet
Constants ¶
View Source
const ( // 信息所在的行 DataSheetHeader_FieldName = 0 // 字段名(对应proto) DataSheetHeader_FieldType = 1 // 字段类型 DataSheetHeader_FieldMeta = 2 // 字段特性 DataSheetHeader_Comment = 3 // 用户注释 DataSheetHeader_DataBegin = 4 // 数据开始 )
View Source
const ( ColumnMajor_RowDataBegin = 1 ColumnMajor_ColumnValue = 4 )
View Source
const ( // 信息所在的行 TypeSheetRow_Pragma = 0 // 配置 TypeSheetRow_FieldDesc = 1 // 类型描述 TypeSheetRow_Comment = 2 // 字段名(对应proto) TypeSheetRow_DataBegin = 3 // 数据开始 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DataHeader ¶
type DataHeader struct { // 按字段名分组索引字段, 字段不重复 HeaderByName map[string]*model.FieldDescriptor // contains filtered or unexported fields }
func (*DataHeader) AsymmetricEqual ¶
func (self *DataHeader) AsymmetricEqual(other *DataHeader) (string, bool)
func (*DataHeader) Equal ¶
func (self *DataHeader) Equal(other *DataHeader) (string, bool)
func (*DataHeader) FieldRepeatedCount ¶
func (self *DataHeader) FieldRepeatedCount(fd *model.FieldDescriptor) (count int)
func (*DataHeader) ParseProtoField ¶
func (self *DataHeader) ParseProtoField(index int, sheet *Sheet, localFD *model.FileDescriptor, globalFD *model.FileDescriptor) bool
检查字段行的长度
func (*DataHeader) RawField ¶
func (self *DataHeader) RawField(index int) *model.FieldDescriptor
func (*DataHeader) RawFieldCount ¶
func (self *DataHeader) RawFieldCount() int
type DataHeaderElement ¶
func (*DataHeaderElement) Parse ¶
func (self *DataHeaderElement) Parse(def *model.FieldDescriptor, localFD *model.FileDescriptor, globalFD *model.FileDescriptor, headerByName map[string]*model.FieldDescriptor) int
type File ¶
type File struct { LocalFD *model.FileDescriptor // 本文件的类型描述表 GlobalFD *model.FileDescriptor // 全局的类型描述表 FileName string Header *DataHeader // contains filtered or unexported fields }
1个电子表格文件
func (*File) CheckValueRepeat ¶
func (self *File) CheckValueRepeat(fd *model.FieldDescriptor, value string) bool
func (*File) ExportData ¶
func (self *File) ExportData(dataModel *model.DataModel, parentHeader *DataHeader) bool
func (*File) ExportLocalType ¶
func (*File) GlobalFileDesc ¶
func (self *File) GlobalFileDesc() *model.FileDescriptor
func (*File) IsVertical ¶
type Sheet ¶
type Sheet struct { *xlsx.Sheet Row int // 当前行 Column int // 当前列 // contains filtered or unexported fields }
描述一个表单
func (*Sheet) GetCellData ¶
获取单元格 cursor=行, index=列
func (*Sheet) GetCellDataAsNumeric ¶
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
example
|
|
golang/table
Generated by github.com/davyxu/tabtoy Version: 2.9.1 DO NOT EDIT!!
|
Generated by github.com/davyxu/tabtoy Version: 2.9.1 DO NOT EDIT!! |
Generated by github.com/davyxu/tabtoy Version: 2.7.4 DO NOT EDIT!!
|
Generated by github.com/davyxu/tabtoy Version: 2.7.4 DO NOT EDIT!! |
Click to show internal directories.
Click to hide internal directories.