summaryrefslogtreecommitdiff
path: root/cell.go
diff options
context:
space:
mode:
Diffstat (limited to 'cell.go')
-rw-r--r--cell.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/cell.go b/cell.go
index afe8635..3cf880a 100644
--- a/cell.go
+++ b/cell.go
@@ -305,6 +305,11 @@ func (f *File) SetCellFormula(sheet, axis, formula string) {
completeRow(xlsx, rows, cell)
completeCol(xlsx, rows, cell)
+ if formula == "" {
+ xlsx.SheetData.Row[xAxis].C[yAxis].F = nil
+ f.deleteCalcChain(axis)
+ return
+ }
if xlsx.SheetData.Row[xAxis].C[yAxis].F != nil {
xlsx.SheetData.Row[xAxis].C[yAxis].F.Content = formula
} else {