Function Reference

_XLChart_TitleGet

Return information about a title. This can be the chart or any axis title.

#Include <ExcelChart.au3>
_XLChart_TitleGet($oObject)

 

Parameters

$oObject Title object (e.g. $oChart.ChartTitle or $oChart.Axes([$xlCategory|$xlValue|$xlSeriesAxis]).AxisTitle)

 

Return Value

Success: One-dimensional one based array with the following information:
    1 - AutoScaleFont: True if the text in the object changes font size when the object size changes
    2 - Caption: String representing the chart or axis title text
    3 - Format: ChartFormat object
    4 - FormulaLocal: String representing the formula in A1-style notation (in the language of the user)
    5 - FormulaR1C1Local: String representing the formula in R1C1-style notation (in the language of the user)
    6 - Height: Height in points
    7 - HorizontalAlignment: Variant representing the horizontal alignment. See the XlHAlign enumeration
    8 - IncludeInLayout: True if a chart or axis title will occupy the chart layout space when a chart layout is being determined (default = True)
    9 - Left: Value in points representing the distance from the left edge of the title to the left edge of the chart area
    10 - Orientation: Variant representing the text orientation
    11 - Position: Position of the title on the chart. XlChartElementPosition enumeration
    12 - Shadow: Boolean that determines if the object has a shadow
    13 - Top: Value in points representing the distance from the top edge of the title to the top of the chart area
    14 - VerticalAlignment: Variant representing the vertical alignment
    15 - Width: Width in points
Failure: Returns "" and sets @error:
    1 - $oObject is not an object

 

Remarks

None.

 

Related

 

Example


#AutoIt3Wrapper_UseX64=n
#AutoIt3Wrapper_AU3Check_Parameters= -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#AutoIt3Wrapper_AU3Check_Stop_OnWarning=Y
#include-once
#include <ExcelChart.au3>
#include <Array.au3>

; *****************************************************************************
; Create example environment
; *****************************************************************************
Global $aExcel = _XLChart_Example(True, 0, -1, -1, -1)
If @error = 2  Then Exit MsgBox(16, "Excel Chart Example Script", "The installed Excel version is not supported by this UDF!" & @CRLF & "Version must be >= 12 (Excel 2007).")
If @error <> 0 Then Exit MsgBox(16, "Excel Chart Example Script", "Error " & @error & " returned by _XLChart_Example on line " & @ScriptLineNumber)

; *****************************************************************************
; Example 1
; Get chart title of Chart 1
; *****************************************************************************
Global $aResult = _XLChart_TitleGet($aExcel[1].ChartTitle)
If @error Then MsgBox(64, "Excel Chart Example Script", "Error " & @error & " returned by function '_XLChart_TitleGet on line " & @ScriptLineNumber)
_ArrayDisplay($aResult)