xlsx

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: BSD-2-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CfgMap = map[string]XlsxFile{}

CfgMap 配置文件

Functions

func ReadConfig

func ReadConfig()

ReadConfig 读取xls配置

func ReadFile

func ReadFile(fileName string) ([]byte, error)

func ReloadConfig

func ReloadConfig(k string) error

ReloadConfig 重载配置

func WatchConfig

func WatchConfig(path string)

WatchConfig 监听配置变化

Types

type Xlsx

type Xlsx struct {
	Log *mlog.Logger
	// contains filtered or unexported fields
}

func NewSession

func NewSession(path string, sheetName string, tableHeaderRowCount int, table interface{}) *Xlsx

NewSession 创建表格

func NewSessionBinary

func NewSessionBinary(fileData []byte, sheetName string, tableHeaderRowCount int, table interface{}) *Xlsx

NewSessionBinary 通过二进制打开

func NewSessionBinaryReflect

func NewSessionBinaryReflect(fileData []byte, sheetName string, tableHeaderRowCount int, tableType reflect.Type) *Xlsx

NewSessionBinary 通过二进制打开

func (*Xlsx) Get

func (s *Xlsx) Get(value interface{}) error

Get 获得数据需要传入数组

func (*Xlsx) GetMap

func (s *Xlsx) GetMap(value reflect.Value) error

Get 获得数据需要传入数组

type XlsxFile

type XlsxFile interface {
	Head() int
	Obj() interface{}
	Data() interface{}
}

Jump to

Keyboard shortcuts

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