tableparser

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RangeDataRows

func RangeDataRows(table book.Tabler, header *Header, fn func(*book.Row) error) error

RangeDataRows ranges data rows in the table.

Types

type Header struct {
	NameRow  int
	TypeRow  int
	NoteRow  int
	DataRow  int
	NameLine int
	TypeLine int
	NoteLine int
	Sep      string
	Subsep   string

	AdjacentKey bool
}

Header represents the table sheet header options. It merges sheet-level, book-level, and global-level header options into the final header options.

func NewHeader

func NewHeader(sheetOpts *tableaupb.WorksheetOptions, bookOpts *tableaupb.WorkbookOptions, globalOpts *options.HeaderOption) *Header

NewHeader creates a new header, which merges sheet-level, book-level, and global-level header options into the final header options.

type Option

type Option func(*Options)

Option is the functional option type.

func Mode

func Mode(mode tableaupb.Mode) Option

func Nested

func Nested(nested bool) Option

func VTypeCell

func VTypeCell(cursor int, typeCell string) Option

type Options

type Options struct {
	Nested bool
	Mode   tableaupb.Mode
	// contains filtered or unexported fields
}

Options follow the design of Functional Options(https://github.com/tmrts/go-patterns/blob/master/idiom/functional-options.md)

func ParseOptions

func ParseOptions(options ...Option) *Options

func (*Options) GetVTypeCell

func (opts *Options) GetVTypeCell(cursor int) string

func (*Options) IsUnionMode

func (opts *Options) IsUnionMode() bool

IsUnionMode returns true if it belongs to following modes:

  • MODE_UNION_TYPE
  • MODE_UNION_TYPE_MULTI

Jump to

Keyboard shortcuts

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