Documentation
¶
Index ¶
- func ConvertHTMLToRichText(html string) string
- type Cell
- type CellStyle
- type InlineString
- type Row
- type Sheet
- type Template
- func (t *Template) Apply(data map[string]any) error
- func (t *Template) Close() error
- func (t *Template) ProcessLoops(data map[string]any) error
- func (t *Template) Save(path string) error
- func (t *Template) SetCellValue(placeholder, value string) error
- func (t *Template) SetCellValueHTML(placeholder, htmlValue string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertHTMLToRichText ¶
ConvertHTMLToRichText converts basic HTML to Excel rich text format Supports: <b>, <i>, <u>, <span style="color:...">
Types ¶
type Cell ¶
type Cell struct {
Ref string `xml:"r,attr,omitempty"`
Type string `xml:"t,attr,omitempty"`
Value string `xml:"v,omitempty"`
IS *InlineString `xml:"is,omitempty"`
}
Cell represents a cell in Excel
type CellStyle ¶
type CellStyle struct {
BackgroundColor string // Hex color like "FFFF00" for yellow
FontColor string // Hex color like "FF0000" for red
FontSize int // Font size in points
Bold bool
Border bool // Simple border on/off
}
CellStyle represents formatting options for a cell
type Sheet ¶
type Sheet struct {
// contains filtered or unexported fields
}
Sheet represents a worksheet in the XLSX file
type Template ¶
type Template struct {
// contains filtered or unexported fields
}
Template represents an XLSX document template
func (*Template) ProcessLoops ¶
ProcessLoops handles {#arrayName}...{/arrayName} in rows
func (*Template) SetCellValue ¶
SetCellValue replaces a placeholder in cells with a value
func (*Template) SetCellValueHTML ¶
SetCellValueHTML replaces a placeholder with HTML content (basic support)
Click to show internal directories.
Click to hide internal directories.