xlsx

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: AGPL-3.0, AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	XLSX_TAG_CELL      = "cell"
	XLSX_TAG_CELL_AUTO = "auto"
	XLSX_TAG_CELL_SKIP = "-"
	XLSX_TAG_TITLE     = "title"
	XLSX_TAG_SHEET     = "sheet"
	XLSX_TAG_FORMAT    = "format"
	XLSX_TAG_LINK      = "link"
)

Variables

This section is empty.

Functions

func IsNotStructType

func IsNotStructType(fieldType reflect.Type) bool

func IsSlice

func IsSlice(value any) bool

func IsSliceType

func IsSliceType(fieldType reflect.Type) bool

Types

type Field

type Field struct {
	// contains filtered or unexported fields
}

Field - информация об одном поле

type Sheet

type Sheet struct {
	// contains filtered or unexported fields
}

Sheet - закладка в Excel файле

func NewSheet

func NewSheet(xlsx *Xlsx, sheetName string, rowOffset int, transpose bool) (*Sheet, error)

func (*Sheet) SetRowStyle

func (s *Sheet) SetRowStyle(rowStyle int)

func (*Sheet) SetTitleStyle

func (s *Sheet) SetTitleStyle(titleStyle int)

type WriteOption

type WriteOption struct {
	SetTitles bool
	NewRow    bool
	//SheetName      string
	TitlePrefix    string
	GroupTitles    bool
	TitleGroupName string
	Transpose      bool // поменять столбцы и строки
	AutoFilter     bool
	CascadeStruct  bool // каскадно выводить все вложенные структуры
	FloatPrecision int  // точность округления данных
}

type Xlsx

type Xlsx struct {
	// contains filtered or unexported fields
}

func NewXlsx

func NewXlsx(reqID uint64, file *excelize.File) *Xlsx

func (*Xlsx) Close

func (xls *Xlsx) Close() error

func (*Xlsx) File

func (xls *Xlsx) File() *excelize.File

func (*Xlsx) WriteObject

func (xls *Xlsx) WriteObject(val any, opt WriteOption) (err error)

func (*Xlsx) WriteStruct

func (xls *Xlsx) WriteStruct(val interface{}, sheetNameIn string, opt WriteOption) (err error)

func (*Xlsx) WriteToBuffer

func (xls *Xlsx) WriteToBuffer() (*bytes.Buffer, error)

Jump to

Keyboard shortcuts

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