basic variable = sheets.getbyname(..) After inserting a new sheet with sheets.copybyname before this sheet , the basic variable points to the wrong sheet, here sheetpositon -1. You get the same effect after removing a sheet, the variable points then to sheetpositon+1. The problem is new in this LO version. A retest in LO 4.0 is OK. REM ***** BASIC ***** global otabledoc as variant Sub Main oTableDoc=ThisComponent oSheets = oTableDoc.sheets if osheets.hasbyname("Tabellenew") then osheets.removebyname("Tabellenew") endif Sheet1 = oSheets.GetbyName("Tabelle1") oSheets = oTableDoc.sheets 'msgbox osheets.dbg_methods osheets.copybyname(sheet1.name,"Tabellenew",0) 'because 3.Parameter = 0 --> insert the new sheet before the sheet1 Tabelle1 'if you insert the new sheet after the old sheet, everything is ok. Sheet1.getCellByPosition(0,0).string=sheet1.name 'write to the sheet Tabellenew, not to the sheet Tabelle1 End Sub
*** Bug 70081 has been marked as a duplicate of this bug. ***
*** Bug 70754 has been marked as a duplicate of this bug. ***
Created attachment 88172 [details] bug example
Also getByIndex (see bug example). Seems that affected all documents that assign variable = ThisComponent.Sheets. ... Please, fix this bug in 4.1.3.
Created attachment 88289 [details] [review] fix A Sheet.RangeAddress does not get updated on copy or move.
Include the fix in next release, please.
there's some patch attached here - could some Calc developer please take a look? Eugenij, it's best to send patches to gerrit - in bugzilla they are usually only found by accident, months later.... https://wiki.documentfoundation.org/Development/gerrit
(In reply to comment #7) > there's some patch attached here - could some Calc developer please take a > look? > > Eugenij, it's best to send patches to gerrit - in bugzilla they are usually > only found by accident, months later.... > > https://wiki.documentfoundation.org/Development/gerrit Michael, thanks for the tip. I looked at the link. Sorry, I have no experience with git.
Noel Power committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=8eec79e595eb651cd41e2f6a1918af67c4d43cf7 Revert "fix Worksheet.Cells by now allowing TableSheet..." fdo#70079 The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
*** Bug 74118 has been marked as a duplicate of this bug. ***
Just wanted to let you know that this bug is still present in version 4.2.6.3! It gave me a headache as my macro wasn't working anymore until I found this bug here! As it is quite old, I thought it should have been fixed already!?
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.