core

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateStyle

func CreateStyle(file *excelize.File, styleSettings map[string]interface{}) map[string]int

CreateStyle creates styles in an Excel file based on a map of style settings.

Args:

file (*excelize.File): The Excel file object.
styleSettings (map[string]map[string]interface{}): A map containing key-value pairs for
												   style names and their individual settings.

Returns:

map[string]int: A map linking style names to their corresponding style index in the Excel file.

func WriteExcel

func WriteExcel(data string) string

WriteExcel takes a JSON string containing file properties, styles, and content and returns a base64 encoded string of the generated Excel file.

Args:

data (string): JSON data representing the Excel file information.

Returns:

string: Base64 encoded string of the generated Excel file.

Panics:

  • panics on errors during JSON unmarshalling or cell conversion.

Types

type ExcelWriter added in v0.1.7

type ExcelWriter struct {
	File       *excelize.File
	StyleMap   map[string]interface{}
	Content    map[string]interface{}
	FileProps  map[string]interface{}
	Protection map[string]interface{}
	SheetOrder []interface{}
	Engine     interface{}
}

type StyleWrapper

type StyleWrapper struct {
	Style map[string]map[string]interface{} `json:"Style" binding:"required"`
}

Jump to

Keyboard shortcuts

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