diff options
| author | xuri <xuri.me@gmail.com> | 2019-02-22 22:17:38 +0800 |
|---|---|---|
| committer | xuri <xuri.me@gmail.com> | 2019-02-22 22:17:38 +0800 |
| commit | 0072bb731043f89ce978778b9d7fdc6160e29de0 (patch) | |
| tree | c44726082c606dbbcf6fa5c1dfba31cd81993c84 /cell.go | |
| parent | e780e41e0222517caa9c69030b5955ab2b458a49 (diff) | |
resolve the issue corrupted xlsx after deleting formula of cell, reference #346
Diffstat (limited to 'cell.go')
| -rw-r--r-- | cell.go | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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 { |
