Basic Macro to Increment Chart's Range: Progress

Jonathan Levi drjlevi6 at aol.com
Sun Nov 11 18:55:08 PST 2012


I'm making progress toward a LibreOffice Basic macro to increment a spreadsheet chart's data range. First task is to get the range; here's what I've got:

Sub Main
Dim Doc As Object
Dim Charts As Object
Dim Chart as Object
Dim chartData as Object
Dim RangeAddress(0) as new com.sun.star.table.CellRangeAddress

Doc = ThisComponent
Charts = Doc.Sheets(0).Charts
Chart = Charts.getByIndex(0).EmbeddedObject
chartData = Chart.Data
End Sub

The chartData object almost contains what I need, but not quite:
Data  Object(0 to 3)
...
RowDescriptions(0 to 3)
...

What I need is the piece of data saying that my data consists of rows 2 through 5 (row 1 contains the header). Any ideas?

TIA, Jonathan

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20121111/d9d93b7d/attachment.html>


More information about the LibreOffice mailing list