Selaa lähdekoodia

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

xuri 5 vuotta sitten
vanhempi
commit
2ccb8f62ed
1 muutettua tiedostoa jossa 3 lisäystä ja 0 poistoa
  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 {