From 18afc88759558478cb6d433e725ccd10d4474f7e Mon Sep 17 00:00:00 2001 From: yeshu <673643706@qq.com> Date: Fri, 1 Jul 2022 00:46:23 +0800 Subject: [PATCH] This closes #1264, fix can't modify cell content issue in some cases Remove inline rich text when setting cell value and cell formulas --- cell.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cell.go b/cell.go index 6d4c62b..286085b 100644 --- a/cell.go +++ b/cell.go @@ -266,6 +266,7 @@ func (f *File) SetCellInt(sheet, axis string, value int) error { defer ws.Unlock() cellData.S = f.prepareCellStyle(ws, col, row, cellData.S) cellData.T, cellData.V = setCellInt(value) + cellData.F, cellData.IS = nil, nil return err } @@ -291,6 +292,7 @@ func (f *File) SetCellBool(sheet, axis string, value bool) error { defer ws.Unlock() cellData.S = f.prepareCellStyle(ws, col, row, cellData.S) cellData.T, cellData.V = setCellBool(value) + cellData.F, cellData.IS = nil, nil return err } @@ -328,6 +330,7 @@ func (f *File) SetCellFloat(sheet, axis string, value float64, precision, bitSiz defer ws.Unlock() cellData.S = f.prepareCellStyle(ws, col, row, cellData.S) cellData.T, cellData.V = setCellFloat(value, precision, bitSize) + cellData.F, cellData.IS = nil, nil return err } @@ -353,6 +356,7 @@ func (f *File) SetCellStr(sheet, axis, value string) error { defer ws.Unlock() cellData.S = f.prepareCellStyle(ws, col, row, cellData.S) cellData.T, cellData.V, err = f.setCellString(value) + cellData.F, cellData.IS = nil, nil return err } @@ -451,6 +455,7 @@ func (f *File) SetCellDefault(sheet, axis, value string) error { defer ws.Unlock() cellData.S = f.prepareCellStyle(ws, col, row, cellData.S) cellData.T, cellData.V = setCellDefault(value) + cellData.F, cellData.IS = nil, nil return err } @@ -599,7 +604,7 @@ func (f *File) SetCellFormula(sheet, axis, formula string, opts ...FormulaOpts) cellData.F.Ref = *o.Ref } } - + cellData.IS = nil return err }