diff options
| author | Ri Xu <xuri.me@gmail.com> | 2017-01-24 18:29:02 +0800 |
|---|---|---|
| committer | Ri Xu <xuri.me@gmail.com> | 2017-01-24 18:29:02 +0800 |
| commit | bd5b033b02f3fed70b90ec64b13c3291ba2186ff (patch) | |
| tree | 2c4290f349da2b0f5aec52b72b77099d5855fcc6 /lib.go | |
| parent | 9559f454a7f7a4697bec631247046c99f20599db (diff) | |
Support set work sheet background image.
Diffstat (limited to 'lib.go')
| -rw-r--r-- | lib.go | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -38,7 +38,7 @@ func ReadZipReader(r *zip.Reader) (map[string]string, int, error) { return fileList, worksheets, nil } -// Read XML content as string. +// readXML provides function to read XML content as string. func (f *File) readXML(name string) string { if content, ok := f.XLSX[name]; ok { return content @@ -46,7 +46,8 @@ func (f *File) readXML(name string) string { return "" } -// Update given file content in file list of XLSX. +// saveFileList provides function to update given file content in file list of +// XLSX. func (f *File) saveFileList(name string, content string) { f.XLSX[name] = XMLHeader + content } @@ -63,7 +64,8 @@ func readFile(file *zip.File) string { return string(buff.Bytes()) } -// Convert integer to Excel sheet column title. +// toAlphaString provides function to convert integer to Excel sheet column +// title. func toAlphaString(value int) string { if value < 0 { return "" @@ -77,7 +79,7 @@ func toAlphaString(value int) string { return ans } -// Convert Excel sheet column title to int. +// titleToNumber provides function to convert Excel sheet column title to int. func titleToNumber(s string) int { weight := 0.0 sum := 0 |
