I'm trying to access the data in the data series of a chart with some oobasic coding.
Here is my piece of code :
Code: Select all
Dim oChart, oCharts As Object
Dim oDiagram as Object
Dim oData, oDataArray as Object
Dim DataSeries(0 To 11) as Double
oSheets = ThisComponent.Sheets
oCharts = oSheets(0).Charts
oChart = oCharts(0).EmbeddedObject
oDiagram = oChart.Diagram
oData = oChart.getData()
'''XRay oData
oDataArray = oData.Data
'''XRay oDataArray
DataSeries = oDataArray
'''XRay DataSeries
' loop below fails at i=0
For i=0 To 11
print DataSeries(i)
Next
Any clue on this issue ?
Thanks.