We've only discussed generalities so far. Next we'll look at one of the UNOs that we'll be using on a day-to-day basis as we write macros: the table. Why look at the the table? Quite simply because that's all a worksheet is—a table. Learn to control the table and you can control the worksheet. In particular, we'll look at how the table UNO can be used to access a cell in the worksheet.
Our starting point is, of course, the OpenOffice.org website http://api.openoffice.org/docs/common/ref/com/sun/star/module-ix.html and the module com.sun.star
.
From there we can follow the link to the to the table
module:
From the table
module web page, we can see the contents of the module:
However, at the moment we're only interested in the services:
As you can see, there are quite a number of table‑related Services, but we're only going to be looking at the CellRange
service, and its XCellRange
interface:
When we look on the interface page we can see...