diff options
author | xuri <xuri.me@gmail.com> | 2022-07-18 00:21:34 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2022-07-18 00:21:34 +0800 |
commit | ebea684ae5c60776d4d8364b7360d0c0603cb3b0 (patch) | |
tree | 257562b2549f81ed8593cdd2eaa39ac55652b79a /picture.go | |
parent | 0d4c97c88aa9254a4db5a0b9192d0f431ff90e43 (diff) |
Fix potential file corrupted and change worksheet name case-insensitive
- Using sheet ID instead of sheet index when delete the cell in calculation chain
- Update documentation for exported functions
- Using `sheet` represent the sheet name in the function parameters
Diffstat (limited to 'picture.go')
-rw-r--r-- | picture.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -200,7 +200,7 @@ func (f *File) AddPictureFromBytes(sheet, cell, format, name, extension string, // xl/worksheets/_rels/sheet%d.xml.rels by given worksheet name and // relationship index. func (f *File) deleteSheetRelationships(sheet, rID string) { - name, ok := f.sheetMap[trimSheetName(sheet)] + name, ok := f.getSheetXMLPath(sheet) if !ok { name = strings.ToLower(sheet) + ".xml" } @@ -450,7 +450,7 @@ func (f *File) addContentTypePart(index int, contentType string) { // value in xl/worksheets/_rels/sheet%d.xml.rels by given worksheet name and // relationship index. func (f *File) getSheetRelationshipsTargetByID(sheet, rID string) string { - name, ok := f.sheetMap[trimSheetName(sheet)] + name, ok := f.getSheetXMLPath(sheet) if !ok { name = strings.ToLower(sheet) + ".xml" } |