Documentation
¶
Overview ¶
excel processing.
Index ¶
- func InMergeCell(rowIdx int, colIdx int, mcels []MergeCell) (string, bool)
- func OverwriteMergeCell() func(o *readExcelOp)
- func WithHyperlink(postprocess ...func(link string) string) func(o *readExcelOp)
- func Write(rail miso.Rail, fpath string, sheet string, records [][]string) error
- type ExcelSheet
- type MergeCell
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InMergeCell ¶
Check if (x,y) in merge cell.
func OverwriteMergeCell ¶
func OverwriteMergeCell() func(o *readExcelOp)
Merge cell content is written to each row to maintain the overall structure.
Without this option, merge cells' content only appear in the first row (just like how xlsx is normally converted to csv).
func WithHyperlink ¶ added in v0.4.9
Include hyperlink if any.
Types ¶
type ExcelSheet ¶
func ReadExcel ¶
func ReadExcel(rail miso.Rail, fpath string, ops ...func(*readExcelOp)) ([]ExcelSheet, error)
Read Excel File.
Notice the whole excel file is loaded into memory.
See OverwriteMergeCell.
func (*ExcelSheet) Append ¶
func (e *ExcelSheet) Append(r []string)
type MergeCell ¶
type MergeCell struct {
StartAxis string // axis of top left cell. E.g., "C2".
EndAxis string // axis of bottom right cell. E.g., "D4".
Val string
StartX int // top left cell row no, e.g., "2" in "C2".
StartY byte // top left cell col index, e.g., "C" in "C2".
EndX int // bottom right cell row no, e.g., "4" in "D4".
EndY byte // bottom right cell col index, e.g., "D" in "D4"
}
Present a merge cell in excel sheet.
E.g., "C2:D4".
func BuildMergeCell ¶
Click to show internal directories.
Click to hide internal directories.