The following writes the text to "Sheet1" instead of the usual "TestSheet" from Calc. It worked fine from 3.x up to 4.0.6.2. Sub Main Doc = ThisComponent TestSheet = Doc.createInstance("com.sun.star.sheet.Spreadsheet") Doc.Sheets.insertByName("TestSheet",TestSheet) Cell = TestSheet.getCellByPosition(1,6) Cell.String = "Hello World - Should be on TestSheet but appears on Sheet1" End Sub
Macro Code inserts text as intended in : Ubuntu 14.04 64bit Version: 4.3.0.0.beta1 Build ID: 2e39c7e59c8fc8b16a54c3d981dceef27fb0c07f
Macro Code incorrectly inserts text in Sheet 1 as indicated by greentntminer@gmail.com when I run it in Ubuntu 14.04 64bit Version: 4.2.4.2 Build ID: 63150712c6d317d27ce2db16eb94c2f3d7b699f8
Hi I reproduce on windows 7/64 & Version: 4.2.4.2 Build ID: 63150712c6d317d27ce2db16eb94c2f3d7b699f8 I do *not* reproduce with Version: 4.3.0.0.beta1 Build ID: 2e39c7e59c8fc8b16a54c3d981dceef27fb0c07f The bug seems solved so I close the Issue. Thank you for reporting. In the meantime you can use the following workaround: Sub InsertSheet Doc = ThisComponent Doc.Sheets.insertNewByName("TestSheet", Doc.Sheets.count) TestSheet = Doc.Sheets.getByName("TestSheet") Cell = TestSheet.getCellByPosition(1,6) Cell.String = "Hello World - on TestSheet" End Sub Regards Pierre-Yves