excelKit

package
v2.9.114 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MaxRow row的取值范围: [0, 1048575]
	MaxRow = 1048575
	// MaxCol col的取值范围: [0, 16383]
	MaxCol = 16383
)

Variables

View Source
var NewFile func(opts ...excelize.Options) *excelize.File = excelize.NewFile

NewFile

PS: 返回的 *excelize.File实例,不再使用时应当调用 File.Close().

View Source
var OpenReader func(r io.Reader, opts ...excelize.Options) (*excelize.File, error) = excelize.OpenReader

OpenReader 打开数据流.

PS: 可能会返回 excelize.ErrWorkbookFileFormat,原因: 文件格式不支持(比如.xls文件).

@params r 数据流(包括: 远程文件)

Functions

func ConvertAxisToRowCol

func ConvertAxisToRowCol(axis string) (int, int, error)

ConvertAxisToRowCol

e.g. ("C2") =>

func ConvertColToString

func ConvertColToString(col int) (string, error)

ConvertColToString

e.g. (0) => "A", nil (16368) => "XEO", nil

func ConvertRowColToAxis

func ConvertRowColToAxis(row, col int) (string, error)

ConvertRowColToAxis

e.g. (1, 2) => "C2", nil

func ConvertRowToString

func ConvertRowToString(row int) (string, error)

func NewFileWithPath added in v2.8.141

func NewFileWithPath(path string, opts ...excelize.Options) (*excelize.File, error)

NewFileWithPath 新建1个空白的Excel文件(其内只有1个空白的工作表,表名为"Sheet1")

PS: 返回的 *excelize.File实例,不再使用时应当调用 File.Close().

@param path 文件的路径(如果文件已经存在,会覆盖它)

func OpenFile added in v2.2.39

func OpenFile(path string, opts ...excelize.Options) (*excelize.File, error)

OpenFile 打开本地文件.

PS: 可能会返回 excelize.ErrWorkbookFileFormat,原因: 文件格式不支持(比如.xls文件).

Types

This section is empty.

Jump to

Keyboard shortcuts

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