Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SliceFormatter ¶
func SliceFormatter(val interface{}) string
Return array in format: "1, 2, 3, ...".
How to use:
In struct use excelize-mapper:"format:slice;"
and
m := excelizemapper.NewExcelizeMapper(
excelizemapper.WithFormatter("slice", excelizemapper.SliceFormatter),
)
Types ¶
type DynamicRules ¶
type ExcelizeMapper ¶
type ExcelizeMapper struct {
// contains filtered or unexported fields
}
func NewExcelizeMapper ¶
func NewExcelizeMapper(opts ...Option) ExcelizeMapper
func (*ExcelizeMapper) SetData ¶
func (em *ExcelizeMapper) SetData(f *excelize.File, sheet string, slice interface{}) error
func (*ExcelizeMapper) SetFormatter ¶
func (em *ExcelizeMapper) SetFormatter(name string, format Format)
type Option ¶
type Option func(o *options)
func WithAutoSort ¶
WithAutoSort set auto sort
if auto sort is false, use tag index. default is true.
func WithDefaultWidth ¶
WithDefaultWidth set default width
func WithFormatter ¶
WithFormatter set formatter
Click to show internal directories.
Click to hide internal directories.