Created attachment 92864 [details] example of "sheets.inserByName" function Hello, following the use of the function 'sheets.insertByName' I've realized it didn't work properly or at least differently from OpenOffice example code Set oSheet2 = objDocument.createInstance ("com.sun.star.sheet.Spreadsheet") objDocument.Sheets.insertByName "ListField" oSheet2 set ocell oSheet2.getCellRangeByName = ("A1") oCell.setString ("Field1") In fact, instead of writing "Field1" in cell A1 of the "ListField" sheet, it writes "Field1" in cell "A1" of sheet "Sheet1" To write properly in the "LisftField" sheet, I must use this code : Set oSheet2 = objDocument.createInstance ("com.sun.star.sheet.Spreadsheet") objDocument.Sheets.insertByName "ListField" oSheet2 set oSheet2 objDocument.getSheets = (). getByName ("ListField") set ocell oSheet2.getCellRangeByName = ("A1") oCell.setString ("Field1") vd
On pc Debian x86-64 with master sources updated yesterday, I can reproduce this. Noel: any idea/code pointer?
*** This bug has been marked as a duplicate of bug 70079 ***
(In reply to comment #1) > On pc Debian x86-64 with master sources updated yesterday, I can reproduce > this. > > Noel: any idea/code pointer? could you try with patch from bug # 70009 (sorry don't have much time these days for libreoffice)
Noel: I git updated today (so it included http://cgit.freedesktop.org/libreoffice/core/commit/?id=8eec79e595eb651cd41e2f6a1918af67c4d43cf7) and built, I still got have the problem.
(In reply to comment #4) > Noel: I git updated today (so it included > http://cgit.freedesktop.org/libreoffice/core/commit/ > ?id=8eec79e595eb651cd41e2f6a1918af67c4d43cf7) and built, I still got have > the problem. are you sure?, I was fairly positive that this was the same issue and I tried here again last night, seemed to me to work, e.g. ran the macro and ListField:A1 gets updated whereas without the patch the current sheet was getting updated. I've deleted that tree again now to free up space for other tasks, be grate if you can try confirm again
Noel: oups you're right, I had done it wrong. WFM.