render

package
v0.0.0-...-35a2fce Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FlowFormulaDirect_Cell int = iota
	FlowFormulaDirect_H
	FlowFormulaDirect_V
	FlowFormulaDirect_Table
)
View Source
const (
	FlowFormulaFormat_String  string = "s" // string
	FlowFormulaFormat_Float   string = "f" // float64
	FlowFormulaFormat_Int     string = "d" // int
	FlowFormulaFormat_Percent string = "p" // float64
)

Variables

Functions

func Render

func Render(workbook *excelize.File, engine RenderEngine) error

Types

type Area

type Area struct {
	Left   int
	Top    int
	Right  int
	Bottom int
}

func NewArea

func NewArea(dim string) (*Area, error)

func (Area) Contains

func (area Area) Contains(col int, row int) bool

type FlowFormula

type FlowFormula struct {
	Direct int
	Format FlowFormulaFormat
	Code   string
}

func TryParseFlowFormula

func TryParseFlowFormula(value string) *FlowFormula

type FlowFormulaFormat

type FlowFormulaFormat struct {
	Type       string
	Constraint int
}

func ParseFlowFormulaFormat

func ParseFlowFormulaFormat(value string) FlowFormulaFormat

func (FlowFormulaFormat) GenerateFormatStr

func (format FlowFormulaFormat) GenerateFormatStr() *string

type RenderEngine

type RenderEngine interface {
	InitData(data map[string]any) error
	CalcValue(formula *FlowFormula) (data [][]any, rows int, cols int, err error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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