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 --- calcchain.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'calcchain.go') 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 { -- cgit v1.2.1