Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

excel chart set

zmworm edited this page Apr 29, 2026 · 53 revisions

Excel: Chart - set

Modify an existing chart's properties.

Path: /{SheetName}/chart[N]

Properties

Property Accepted Values Description
title string Update chart title
legend position keyword Update legend position
catTitle / hTitle string Update category axis title
axisTitle / vTitle string Update value axis title
dataLabels / labels comma-separated: value,category,series,percent,all,none,true Configure data labels
colors comma-separated hex RGB Update color palette
axisMin / min number Minimum value for value axis
axisMax / max number Maximum value for value axis
majorUnit number Major unit interval for value axis
minorUnit number Minor unit interval for value axis
axisNumFmt / axisNumberFormat format code Number format for value axis
categories comma-separated Update category labels
data Series1:1,2,3;Series2:4,5,6 Update all series data
series1..seriesN Name:val1,val2 Update individual series
labelPos/labelposition position keyword Label position: center/ctr, insideEnd/inside, insideBase/base, outsideEnd/outside, bestFit/best/auto, top/t, bottom/b, left/l, right/r
labelFont "size:color:bold" Label font e.g. "10:FF0000:true"
gridlines/majorGridlines true, none/false, or "color:widthPt:dash" Major gridlines configuration
minorGridlines same as gridlines Minor gridlines configuration
plotFill/plotAreaFill hex color, gradient "C1-C2[:angle]", or "none" Plot area background
chartFill/chartAreaFill hex color, gradient "C1-C2[:angle]", or "none" Chart area background
lineWidth number (pt) Line width in pt
lineDash/dash dash style keyword solid, dot, dash, dashdot, longdash, longdashdot, longdashdotdot
marker/markers "style:size:color" Marker config e.g. "circle:8:FF0000". Styles: circle, diamond, square, triangle, star, x, plus, dash, dot, none
style/styleId 1-48 or none Chart style
transparency 0-100 Series transparency (%)
opacity/alpha 0-100 Series opacity (%)
gradient "color1-color2:angle" Gradient fill
gradients semicolon-separated Per-series gradients
secondaryAxis/secondary comma-separated indices 1-based series indices for secondary axis
title.font/titlefont font name Title typeface
title.size/titlesize number (pt) Title font size
title.color/titlecolor hex color Title font color
title.bold/titlebold true/false Title bold
title.glow/titleglow "COLOR-RADIUS-OPACITY" or "none" Title glow effect
title.shadow/titleshadow "COLOR-BLUR-ANGLE-DIST-OPACITY" or "none" Title shadow effect
legendfont/legend.font "size:color:fontname" Legend font e.g. "9:8B949E:Helvetica Neue"
axisfont/axis.font "size:color:fontname" Axis label font e.g. "10:58626E:Arial"
series.shadow/seriesshadow "COLOR-BLUR-ANGLE-DIST-OPACITY" or "none" Shadow on series
series.outline/seriesoutline "COLOR-WIDTH" or "none" Series outline e.g. "FFFFFF-0.5"
gapwidth/gap 0-500 Bar gap width
overlap -100 to 100 Bar overlap
view3d/camera/perspective "rotX,rotY,perspective" 3D rotation e.g. "15,20,30"
areafill/area.fill "C1-C2[:angle]" Area gradient fill
referenceLine/refLine value or "value:color:width:dash" Reference/target line
colorRule/conditionalColor rule expression Conditional coloring for data points
smooth bool Smooth line curves (line/scatter)
showMarker/showMarkers bool Toggle markers on line charts
dropLines bool Show vertical drop lines from data points to X axis (line charts)
hiLowLines bool Show high-low lines connecting highest/lowest series values (line/stock)
upDownBars bool Show gain/loss bars between first and last series (line/stock)
serLines/seriesLines bool Show series connector lines (stacked bar/pie-of-pie)
dataTable bool Show data table below chart
roundedCorners bool Rounded corners on chart area
preset/theme preset name Chart style preset
plotArea.x/y/w/h decimal (0-1) Manual layout of plot area
title.x/y/w/h decimal (0-1) Manual layout of chart title
legend.x/y/w/h decimal (0-1) Manual layout of legend
legend.overlay bool Legend overlays chart area
dataLabel{N}.text string Custom text for data label N
dataLabel{N}.x/y/w/h decimal (0-1) Manual layout of data label N
dataLabel{N}.delete bool Hide/show individual data label
dataLabels.separator string Label separator
dataLabels.numFmt format code Label number format (e.g., "0.0%")
series{N}.name string Update series name
series{N}.values comma-separated or cell range Update series values
axisLine/axis.line "color:width:dash" Value axis line styling
catAxisLine "color:width:dash" Category axis line styling
axisVisible/axis.visible bool Hide/show axes
majorTickMark/majorTick tick style Major tick mark style
minorTickMark/minorTick tick style Minor tick mark style
tickLabelPos position Tick label position
axisOrientation/axisReverse bool Reverse axis direction
logBase/logScale number Logarithmic scale base
dispUnits/displayUnits thousands, millions, etc. Display units
point{N}.color hex color Individual data point color
invertIfNeg bool Invert bars for negative values
explosion/explode 0-400 Pie slice explosion (%)
errBars/errorBars error bar type Error bars
chartArea.border/chartBorder border format Chart area border
plotArea.border/plotBorder border format Plot area border
x, y EMU or units Chart position (top-left corner)
width, height EMU or units Chart size

Extended chart types (cx:chart — histogram, funnel, treemap, sunburst, boxWhisker): All properties above are supported on extended charts via the same set command, plus each cx type has its own knob vocabulary. For the complete histogram vocabulary (binning + styling + layout + axis scaling + plot/chart area fills + shadows + legend + data labels), see the dedicated page:

Other cx types keep their specific knobs (parentLabelLayout for treemap, quartileMethod for boxWhisker) and share the same cx styling vocabulary documented on the histogram page.

Examples

officecli set data.xlsx /Sheet1/chart[1] --prop title="Updated Sales Chart"
officecli set data.xlsx /Sheet1/chart[1] --prop legend=bottom
officecli set data.xlsx /Sheet1/chart[1] --prop catTitle="Month" --prop axisTitle="Revenue"
# Format chart title
officecli set data.xlsx /Sheet1/chart[1] --prop title.font=Arial --prop title.size=16 --prop title.bold=true
# Add legend font
officecli set data.xlsx /Sheet1/chart[1] --prop legendfont="9:8B949E:Helvetica Neue"
# 3D perspective
officecli set data.xlsx /Sheet1/chart[1] --prop view3d="15,20,30"
# Series outline
officecli set data.xlsx /Sheet1/chart[1] --prop series.outline="FFFFFF-0.5"
# Manual layout
officecli set data.xlsx /Sheet1/chart[1] --prop plotArea.x=0.1 --prop plotArea.y=0.15 --prop plotArea.w=0.8 --prop plotArea.h=0.7
# Reference line
officecli set data.xlsx /Sheet1/chart[1] --prop referenceLine="75:FF0000:1.5:dash"
# Custom data label
officecli set data.xlsx /Sheet1/chart[1] --prop dataLabel1.text="Peak" --prop dataLabel1.x=0.5 --prop dataLabel1.y=0.1
# Update series name and values
officecli set data.xlsx /Sheet1/chart[1] --prop series1.name="Revenue 2026" --prop series1.values="100,200,300,400"
# Axis styling
officecli set data.xlsx /Sheet1/chart[1] --prop axisLine="333333:1:solid" --prop majorTickMark=outside

Based on OfficeCLI v1.0.64

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /