excelKit

package
v0.2.14 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateExcel

func CreateExcel(fileName, sheetName string, headers []string, contents [][]interface{}) (string, error)

CreateExcel 生成excel *

  • @param filePath 文件路径
  • @param fileName 文件名
  • @param sheetName sheet名
  • @param headers 表头
  • @param contents 内容 双切片按数据库的行列来理解,第一层切片为数据库单条数据,第二层切片为单条数据中的各个元素;
  • <br/> 例如:[[1,2,3],[4,5,6]] 生成的excel为:
  • <br/> A B C
  • <br/> 1 1 2 3
  • <br/> 2 4 5 6
  • @return 返回生成的excel文件路径

func Excel2Cvf added in v0.2.13

func Excel2Cvf(excelFileName, sheetName, cvfFileName string) error

Excel2Cvf excel转cvf

  • 注意,内容中的第一行被认定为表头,不读取,排序方式为:姓名、手机号、邮箱、qq
  • @param excelFileName excel文件名
  • @param sheetName sheet名
  • @param cvfFileName cvf文件名

Types

This section is empty.

Jump to

Keyboard shortcuts

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