Message de k.misha  date 2013-04-10 12:34 :

How can I select a sheet in calc document?


You probably mean : display a particular sheet of a spreadsheet document.
The currently displayed sheet is called the Active Sheet.
You have to set it with the desired sheet object as argument.

REM -- With OpenOffice Basic easy coding ! ---
Dim myDoc As Object, mySheet As Object
myDoc = ThisComponent
mySheet =  myDoc.Sheets.getByName("October")
myDoc.CurrentController.ActiveSheet = mySheet


With Java or C++ you will have to query and use the methods:

Method        from  interface
.getSheets()  com.sun.star.sheet.XSpreadsheetDocument
.getCurrentController() com.sun.star.frame.XModel
.setActiveSheet(mySheet)  com.sun.star.sheet.XSpreadsheetView


Regards
  Bernard

---------------------------------------------------------------------
To unsubscribe, e-mail: api-unsubscr...@openoffice.apache.org
For additional commands, e-mail: api-h...@openoffice.apache.org

Reply via email to