| View previous topic :: View next topic |
| Author |
Message |
xconeis2 Newbie

Joined: 15 May 2009 Posts: 2
|
Posted: Fri May 15, 2009 9:55 am Post subject: How to... how to get a chart type in an existing chart |
|
|
Hello:
I have a spreedsheet with a charts, i need to now what type of chatrs is it... whit a macro.
I have this macros but it's not correct:
Sub oHojas_1
Dim oDoc As Object
Dim oHoja As Object
Dim oGrafico As Object
Dim oGrafico2 As Object
Dim oValor As String
oDoc = StarDesktop.CurrentComponent
oHoja = oDoc.Sheets(0)
oGrafico = oHoja.Charts
oGrafico2 = oGrafico.getByIndex(0)
oValor = oGrafico.getDiagramType(oGrafico2)
MsgBox oValor
end sub |
|
| Back to top |
|
 |
ms777 Super User


Joined: 07 Feb 2004 Posts: 1355
|
Posted: Tue May 19, 2009 2:07 pm Post subject: |
|
|
Hi,
the below code works in OO 3.1 for a bar chart with two data series
Good luck,
ms777
| Code: | Sub Main
oSheet = ThisComponent.sheets.getByIndex(0)
oChart = oSheet.Charts.getByIndex(0)
oCoordSys = oChart.EmbeddedObject.FirstDiagram.CoordinateSystems(0)
msgbox oCoordSys.ChartTypes(0).ChartType
End Sub |
|
|
| Back to top |
|
 |
|