summaryrefslogtreecommitdiff
path: root/lib.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 /lib.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 'lib.go')
-rw-r--r--lib.go6
1 files changed, 3 insertions, 3 deletions
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)
}