summaryrefslogtreecommitdiff
path: root/picture.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2022-07-18 00:21:34 +0800
committerxuri <xuri.me@gmail.com>2022-07-18 00:21:34 +0800
commitebea684ae5c60776d4d8364b7360d0c0603cb3b0 (patch)
tree257562b2549f81ed8593cdd2eaa39ac55652b79a /picture.go
parent0d4c97c88aa9254a4db5a0b9192d0f431ff90e43 (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.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/picture.go b/picture.go
index 44f1f3b..c3d0df7 100644
--- a/picture.go
+++ b/picture.go
@@ -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"
}