excel

package
v0.0.0-...-750a8a5 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package excel @Description TODO 不够好 @Author jiangyang @Created 2020/12/7 11:10 上午

Index

Constants

View Source
const (
	StructTag = "excel"
)

Variables

This section is empty.

Functions

func Axis

func Axis(i, j int) string

获取Excel坐标名

func FileNameOption

func FileNameOption(fileName string) *fileNameOpt

func GetStructType

func GetStructType(t reflect.Type) reflect.Type

func SheetNameOption

func SheetNameOption(sheetName string) *sheetNameOpt

func TitleOption

func TitleOption(titles ...string) *titleOpt

Types

type Excel

type Excel struct {
	ExcelOption
	// contains filtered or unexported fields
}

func New

func New(options ...Option) *Excel

func (*Excel) Check

func (e *Excel) Check() error

func (*Excel) Create

func (e *Excel) Create(data interface{}) error

Create 创建Excel (覆盖原文件)

func (*Excel) Insert

func (e *Excel) Insert(data interface{}) error

Insert 编辑Excel

func (*Excel) Read

func (e *Excel) Read(data interface{}) error

读取Excel 第一行为表头 data: []struct

func (*Excel) Save

func (e *Excel) Save(data interface{}) error

Save 保存

type ExcelOption

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

type Option

type Option interface {
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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