Microsoft 365
Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line.
5,367 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have a workbook I've created in Excel for web with just a single column chart and some sample data to its side
Using office scripts, I'm trying to set the color of an individual column on the chart with this code:
function main(workbook: ExcelScript.Workbook) {
const sheet = workbook.getWorksheet("Sheet1")
const chart = sheet.getChart("Chart 1")
const series = chart.getSeries()[0]
const i = 3
const point = series.getPoints()[i]
point.getFormat().getFill().setSolidColor("red")
}
When I run this in Excel for web, I get the error ChartSeries getPoints: There was an internal error while processing the request.
But if I save this workbook locally and run this script on my desktop Excel, it works as expected. How can I make this code run in Excel for web?