Documentation ¶
Index ¶
- func Array2XlsxByte(data [][]string) (b []byte, err error)
- func Array2XlsxFile(data [][]string, path string) (err error)
- func Array2XlsxIo(data [][]string, w io.Writer) (err error)
- func CoordinateXy2Excel(collomnIndex int, rowIndex int) (output string)
- func GridToTitleArrayWithTitle(grid []map[string]string, title []string) (titleArray [][]string, err error)
- func TitleArraySortByFirst(titleArray [][]string)
- func TitleArrayToGrid(titleArray [][]string) (output []map[string]string, err error)
- func Trim2DArray(input [][]string) (output [][]string)
- func TrimRightRowString(row []string) []string
- func UnmarshalFile(filePath string, obj interface{}) (err error)
- func UnmarshalFileSkipLine(filePath string, obj interface{}, skipline int) (err error)
- func XlsxFile2Array(path string) ([][][]string, error)
- func XlsxFileFirstSheet2ArrayTrim(path string) (output [][]string, err error)
- func XlsxFileFirstSheet2FirstColumnTrim(path string) (output []string, err error)
- func XlsxFileSheetIndex2Array(path string, index int) ([][]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Array2XlsxByte ¶
func Array2XlsxFile ¶
write raw data into xlsx file data key means: rowIndex,columnIndex,value
func Array2XlsxIo ¶
write raw data into a io.Writer data key means: rowIndex,columnIndex,value Array2XlsxIo can be used to write xlsx file in memory without touch filesystem.
func CoordinateXy2Excel ¶
坐标系变换,从xy坐标系变化成excel的字符坐标系 xy坐标从(0,0)开始,excel坐标从A1开始
func GridToTitleArrayWithTitle ¶
func GridToTitleArrayWithTitle(grid []map[string]string, title []string) (titleArray [][]string, err error)
transform from grid to title array keys not in title will return an error key in title but not in element map ,value will be "" in titleArray len(grid)==0 will return a titleArray only have title in it.
func TitleArraySortByFirst ¶
func TitleArraySortByFirst(titleArray [][]string)
func TitleArrayToGrid ¶
transform from title array to grid titleArray should call Trim2DArray already
func Trim2DArray ¶
remove empty cell right(every line will have same length) remove all empty line (include some empty line in between)
func TrimRightRowString ¶
func UnmarshalFile ¶
Unmarshal excel into a array of a struct
you must put data in first sheet accept []struct{Key1 value;Key2 value} or []map[string]string first excel row as struct key,remain excel row as struct value type can not convert will fail lack keys will be ignore
func UnmarshalFileSkipLine ¶
Unmarshal excel into a array of a struct and skip some line from start
func XlsxFile2Array ¶
get all raw data from excel output index mean=> sheetIndex ,row ,cell ,value not remove any cells
func XlsxFileFirstSheet2ArrayTrim ¶
get data from first sheet of excel output index mean=> row ,cell ,value remove all right and bottom blank cells
func XlsxFileFirstSheet2FirstColumnTrim ¶
get data from first column of first sheet of excel file output index name=>row index,value remove any blank cells. output will not include blank cell in middle.
Types ¶
This section is empty.