Explorar el Código

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

xuri hace 5 años
padre
commit
2ccb8f62ed
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      excelize.go

+ 3 - 0
excelize.go

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