Skip to content

excel chart get

zmworm edited this page Apr 29, 2026 · 52 revisions

Excel: Chart - get

Get embedded chart properties.

Path: /{SheetName}/chart[N]

Chart-level attributes

Attribute Type Description
chartType string Chart type (line, line3d, column, bar, pie, area, scatter, combo, etc.)
title string Chart title text
title.size string Title font size (e.g., 14pt)
title.bold bool Title bold
title.color string Title font color (hex)
title.font string Title font name
legend string Legend position (top, bottom, left, right, none)
seriesCount number Number of data series
categories string Comma-separated resolved category values
categoriesRef string Category cell range reference (e.g., Sheet1!$A$2:$A$13)

Axis

Attribute Type Description
axisTitle string Value (Y) axis title
catTitle string Category (X) axis title
axisMin number Minimum value on the value axis
axisMax number Maximum value on the value axis
majorUnit number Major gridline interval
minorUnit number Minor gridline interval
axisNumFmt string Value axis number format (e.g., "$#,##0")
axisFont string Axis label font: "size:color:fontname"
logBase number Logarithmic scale base (e.g., 10)
axisOrientation string Axis direction; maxMin = reversed
valAxisVisible bool Value axis visible
catAxisVisible bool Category axis visible
valAxisLine.color string Value axis line color
valAxisLine.width number Value axis line width (pt)
valAxisLine.dash string Value axis line dash style
catAxisLine.color string Category axis line color
catAxisLine.width number Category axis line width (pt)
catAxisLine.dash string Category axis line dash style
majorTickMark string Major tick style (out, in, cross, none)
minorTickMark string Minor tick style
tickLabelPos string Tick label position (nextTo, high, low, none)
crosses string Axis crossing point (autoZero, min, max)
crossBetween string Cross between categories (between, midCat)
dispUnits string Display units (thousands, millions, etc.)

Gridlines

Attribute Type Description
gridlines bool Major gridlines present
gridlineColor string Major gridline color (hex)
gridlineWidth number Major gridline width (pt)
gridlineDash string Major gridline dash style
minorGridlines bool Minor gridlines present
minorGridlineColor string Minor gridline color
minorGridlineWidth number Minor gridline width (pt)
minorGridlineDash string Minor gridline dash style

Data labels

Attribute Type Description
dataLabels string Comma-separated label components (value, category, series, percent)
labelPos string Data label position

Line chart features

Attribute Type Description
smooth bool Chart-level smooth curves (line/scatter only)
showMarker bool Markers enabled on line charts
dispBlanksAs string How blank cells are handled (gap, zero, span)

Styling

Attribute Type Description
style number Chart style ID (1-48)
plotFill string Plot area fill color (hex)
chartFill string Chart area fill color (hex)
secondaryAxis string Comma-separated series indices on secondary axis
view3d string 3D rotation: "rotX,rotY,perspective"
view3d.rotateX number 3D X rotation
view3d.rotateY number 3D Y rotation
view3d.perspective number 3D perspective
roundedCorners bool Rounded corners on chart area

Series-level attributes

Each series is returned as a child node: /{SheetName}/chart[N]/series[M]

Attribute Type Description
name string Series name
values string Comma-separated resolved values
valuesRef string Values cell range reference (e.g., Sheet1!$B$2:$B$13)
categoriesRef string Per-series categories reference
color string Series color (hex, e.g., #4472C4)
lineWidth number Line width in pt (line/scatter charts)
lineDash string Line dash style (solid, sysDash, dot, dash, dashDot, lgDash, etc.)
smooth bool Per-series smooth override
shadow bool Shadow effect on series
outlineColor string Series outline/border color
marker string Marker shape (circle, diamond, square, triangle, star, x, plus, dash, dot, none)
markerSize number Marker size (OOXML units, 2-72)

Examples

# Get chart properties
officecli get data.xlsx /Sheet1/chart[1]
/Sheet1/chart[1] (chart) chartType=line title=Quarterly Revenue title.size=14pt title.bold=true legend=bottom gridlines=true smooth=true showMarker=true seriesCount=3 categories=Q1,Q2,Q3,Q4
/Sheet1/chart[1]/series[1] (series) "East" name=East values=120,135,148,162 color=#4472C4 lineWidth=2 marker=circle markerSize=5
/Sheet1/chart[1]/series[2] (series) "South" name=South values=95,108,115,128 color=#ED7D31 lineWidth=2 lineDash=sysDash marker=diamond markerSize=6
# Get as JSON
officecli get data.xlsx /Sheet1/chart[1] --json

See Also


Based on OfficeCLI v1.0.64

Clone this wiki locally