out

package
v0.0.0-...-a6b6bab Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package out @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2022 central CLI @Author linngc @License

Package out @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2022 central CLI @Author linngc @License

Package out @Link https://gitee.com/linngc/central-mirror @Copyright Copyright (c) 2022 central CLI @Author linngc @License

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExcelExport

type ExcelExport struct {
}

func (*ExcelExport) MapExport

func (c *ExcelExport) MapExport(heads interface{}, list []map[string]interface{}, sheetName, title string, isGhbj bool) (file *excelize.File, err error)

MapExport map导出

func (*ExcelExport) NormalDownLoad

func (c *ExcelExport) NormalDownLoad(sheetName, fileName, title string, isGhbj bool, list interface{}, res http.ResponseWriter) error

NormalDownLoad 导出excel并下载(单个sheet)

func (*ExcelExport) NormalDynamicDownLoad

func (c *ExcelExport) NormalDynamicDownLoad(sheetName, fileName, title, fields string, isGhbj, isIgnore bool,
	list interface{}, res http.ResponseWriter, changeHead ...map[string]string) error

NormalDynamicDownLoad 动态导出excel并下载(单个sheet) @param fileName导出文件名称 @param sheet sheet名称 @param isIgnore 是否忽略指定字段(true 要忽略的字段 false 要导出的字段) @param fields 选择的字段,多个字段用逗号隔开,最后一个字段后面也要加逗号,如:字段1,字段2,字段3, @param changeHead 要改变表头的字段,格式是{"字段1":"更改的表头1","字段2":"更改的表头2"}

func (*ExcelExport) NormalDynamicExport

func (c *ExcelExport) NormalDynamicExport(list interface{}, sheetName, title, fields string, isGhbj, isIgnore bool,
	changeHead ...map[string]string) (file *excelize.File, err error)

NormalDynamicExport 导出excel ** 需要在传入的结构体中的字段加上tag:excelize:"title:列头名称;index:列下标(从0开始);" @param list 需要导出的对象数组 @param sheet sheet名称 @param title 标题 @param isGhbj 是否设置隔行背景色

func (*ExcelExport) NormalDynamicExportNoIgnore

func (c *ExcelExport) NormalDynamicExportNoIgnore(list interface{}, sheetName, title string, isGhbj bool) (file *excelize.File, err error)

NormalDynamicExportNoIgnore 导出excel

func (*ExcelExport) NormalDynamicNoIgnoreDownLoad

func (c *ExcelExport) NormalDynamicNoIgnoreDownLoad(sheetName, fileName, title string, isGhbj bool,
	list interface{}, res http.ResponseWriter) error

NormalDynamicNoIgnoreDownLoad 动态导出excel并下载(单个sheet)

type ExcelExportBatch

type ExcelExportBatch struct {
}

func (*ExcelExportBatch) ExportSharding

func (c *ExcelExportBatch) ExportSharding(sheetName string, title, fields string, isGhbj, isIgnore bool,
	list interface{}, e *excel.ExcelStyle, changeHead ...map[string]string) (err error)

ExportSharding 执行批量导出 其实就是相当于普通sheet导出,只不过是每个sheet分别传对应的数据过去

func (*ExcelExportBatch) InitializeBatch

func (c *ExcelExportBatch) InitializeBatch() (e *excel.ExcelStyle)

InitializeBatch 开启批量导出

Jump to

Keyboard shortcuts

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