Excel
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
1,947 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
I got an issue with using the getSeries() function in excel script.
I want to write script to change the color of the pie chart. I did it manually and I recorded it.
The below is the code:
function main(workbook: ExcelScript.Workbook) {
let selectedSheet = workbook.getActiveWorksheet();
let TestingChart = selectedSheet.getChart("TestingChart");
// Set fill color on series for a chart
TestingChart.getSeries()[0].getFormat().getFill().setSolidColor("#FF0000");
}
However, when I try to run it again. I got error "Chart getSeries: The requested resource doesn't exist."
the chart is a pie chart and I am pretty sure the chart contains some series on it.
Thank you.