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 --- lib.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib.go') diff --git a/lib.go b/lib.go index 3170a6d..99118ff 100644 --- a/lib.go +++ b/lib.go @@ -187,8 +187,8 @@ func JoinCellName(col string, row int) (string, error) { } // ColumnNameToNumber provides a function to convert Excel sheet column name -// to int. Column name case-insensitive. The function returns an error if -// column name incorrect. +// (case-insensitive) to int. The function returns an error if column name +// incorrect. // // Example: // @@ -690,7 +690,7 @@ func (f *File) setIgnorableNameSpace(path string, index int, ns xml.Attr) { // addSheetNameSpace add XML attribute for worksheet. func (f *File) addSheetNameSpace(sheet string, ns xml.Attr) { - name := f.sheetMap[trimSheetName(sheet)] + name, _ := f.getSheetXMLPath(sheet) f.addNameSpaces(name, ns) } -- cgit v1.2.1