From ebea684ae5c60776d4d8364b7360d0c0603cb3b0 Mon Sep 17 00:00:00 2001 From: xuri Date: Mon, 18 Jul 2022 00:21:34 +0800 Subject: 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 --- picture.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'picture.go') 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" } -- cgit v1.2.1