Created attachment 177445 [details] spreadsheet - two sheets - embedded python I want to convert formulas to values in all spreadsheets of a document. To this end wrote a macro (embedded) to do so. Summary from com.sun.star.sheet.SheetLinkMode import VALUE as LINKVALUE for j in range(oSheets.Count): oSheet = oSheets.getByIndex(j) oSheet.LinkMode = LINKVALUE 1. reproduce result by running embedded macro. 2. expected result is a document with no formulas present in each sheet 3. produced are sheets with no formulas on it and >>>> sheet2 is now a copy of sheet1 used: linuxMint 20.2 with distributed LibO
Created attachment 177446 [details] result of dpkg -l | grep libreoffice
ad 3) produced is the first sheet with no formulas, the second has become a copy of the first. This is also the case when the document contains more sheets: all become a copy of the first
I copied the file to my home directory as bug.ods (as the macro was expecting the path). There is a formula in D3 of Sheet1. Running the macro createUpdateSource creates a document bug_tmp.ods which shows how Sheet2 becomes overwritten by Sheet1 contents. Not sure about the specifics, but setting to NEW for now. Arch Linux 64-bit Version: 7.5.0.0.alpha1+ (X86_64) / LibreOffice Community Build ID: 400e44cebd993f4b9b3d878fb9264f99e005c9fb CPU threads: 8; OS: Linux 6.0; UI render: default; VCL: kf5 (cairo+xcb) Locale: fi-FI (fi_FI.UTF-8); UI: en-US Calc: threaded Built on 5 December 2022