Skip to content

Commit

Permalink
fix can't modify cell content issue
Browse files Browse the repository at this point in the history
  • Loading branch information
xdlrt committed Jun 30, 2022
1 parent eee6607 commit c9c7270
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cell.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -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
}

Expand Down Expand Up @@ -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
}

Expand All @@ -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
}

Expand Down Expand Up @@ -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
}

Expand Down Expand Up @@ -599,7 +604,7 @@ func (f *File) SetCellFormula(sheet, axis, formula string, opts ...FormulaOpts)
cellData.F.Ref = *o.Ref
}
}

cellData.IS = nil
return err
}

Expand Down

0 comments on commit c9c7270

Please sign in to comment.