This closes #1264, fix can't modify cell content issue in some cases
Remove inline rich text when setting cell value and cell formulas
This commit is contained in:
parent
dd6c3905e0
commit
18afc88759
7
cell.go
7
cell.go
|
@ -266,6 +266,7 @@ func (f *File) SetCellInt(sheet, axis string, value int) error {
|
||||||
defer ws.Unlock()
|
defer ws.Unlock()
|
||||||
cellData.S = f.prepareCellStyle(ws, col, row, cellData.S)
|
cellData.S = f.prepareCellStyle(ws, col, row, cellData.S)
|
||||||
cellData.T, cellData.V = setCellInt(value)
|
cellData.T, cellData.V = setCellInt(value)
|
||||||
|
cellData.F, cellData.IS = nil, nil
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -291,6 +292,7 @@ func (f *File) SetCellBool(sheet, axis string, value bool) error {
|
||||||
defer ws.Unlock()
|
defer ws.Unlock()
|
||||||
cellData.S = f.prepareCellStyle(ws, col, row, cellData.S)
|
cellData.S = f.prepareCellStyle(ws, col, row, cellData.S)
|
||||||
cellData.T, cellData.V = setCellBool(value)
|
cellData.T, cellData.V = setCellBool(value)
|
||||||
|
cellData.F, cellData.IS = nil, nil
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -328,6 +330,7 @@ func (f *File) SetCellFloat(sheet, axis string, value float64, precision, bitSiz
|
||||||
defer ws.Unlock()
|
defer ws.Unlock()
|
||||||
cellData.S = f.prepareCellStyle(ws, col, row, cellData.S)
|
cellData.S = f.prepareCellStyle(ws, col, row, cellData.S)
|
||||||
cellData.T, cellData.V = setCellFloat(value, precision, bitSize)
|
cellData.T, cellData.V = setCellFloat(value, precision, bitSize)
|
||||||
|
cellData.F, cellData.IS = nil, nil
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -353,6 +356,7 @@ func (f *File) SetCellStr(sheet, axis, value string) error {
|
||||||
defer ws.Unlock()
|
defer ws.Unlock()
|
||||||
cellData.S = f.prepareCellStyle(ws, col, row, cellData.S)
|
cellData.S = f.prepareCellStyle(ws, col, row, cellData.S)
|
||||||
cellData.T, cellData.V, err = f.setCellString(value)
|
cellData.T, cellData.V, err = f.setCellString(value)
|
||||||
|
cellData.F, cellData.IS = nil, nil
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -451,6 +455,7 @@ func (f *File) SetCellDefault(sheet, axis, value string) error {
|
||||||
defer ws.Unlock()
|
defer ws.Unlock()
|
||||||
cellData.S = f.prepareCellStyle(ws, col, row, cellData.S)
|
cellData.S = f.prepareCellStyle(ws, col, row, cellData.S)
|
||||||
cellData.T, cellData.V = setCellDefault(value)
|
cellData.T, cellData.V = setCellDefault(value)
|
||||||
|
cellData.F, cellData.IS = nil, nil
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -599,7 +604,7 @@ func (f *File) SetCellFormula(sheet, axis, formula string, opts ...FormulaOpts)
|
||||||
cellData.F.Ref = *o.Ref
|
cellData.F.Ref = *o.Ref
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
cellData.IS = nil
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue