summaryrefslogtreecommitdiff
path: root/calcchain.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 /calcchain.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 'calcchain.go')
-rw-r--r--calcchain.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/calcchain.go b/calcchain.go
index a1f9c0c..1007de1 100644
--- a/calcchain.go
+++ b/calcchain.go
@@ -49,7 +49,7 @@ func (f *File) deleteCalcChain(index int, axis string) {
calc := f.calcChainReader()
if calc != nil {
calc.C = xlsxCalcChainCollection(calc.C).Filter(func(c xlsxCalcChainC) bool {
- return !((c.I == index && c.R == axis) || (c.I == index && axis == ""))
+ return !((c.I == index && c.R == axis) || (c.I == index && axis == "") || (c.I == 0 && c.R == axis))
})
}
if len(calc.C) == 0 {