Explorar o código

Remove calculated properties to make recalculate formulas in some spreadsheet applications, such as Kingsoft WPS

xuri %!s(int64=5) %!d(string=hai) anos
pai
achega
2ccb8f62ed
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      excelize.go

+ 3 - 0
excelize.go

@@ -273,6 +273,9 @@ func replaceStyleRelationshipsNameSpaceBytes(contentMarshal []byte) []byte {
 //    </row>
 //
 func (f *File) UpdateLinkedValue() error {
+	wb := f.workbookReader()
+	// recalculate formulas
+	wb.CalcPr = nil
 	for _, name := range f.GetSheetMap() {
 		xlsx, err := f.workSheetReader(name)
 		if err != nil {