Read one chart into a snapshot.
Needs ExcelApi 1.12, for ChartSeries.getDimensionValues; check Office.context.requirements.isSetSupported('ExcelApi', '1.12') first.
ChartSeries.getDimensionValues
Office.context.requirements.isSetSupported('ExcelApi', '1.12')
The batch's request context, from Excel.run.
Excel.run
The chart, from the same context.
Whether to read the category cells and the image too.
The snapshot, ready for convertExcelChart.
convertExcelChart
Whatever Office.js throws reading the chart or its series' values. The labels and the image never throw: losing one of them is warned, and the snapshot is returned without it.
const snapshot = await Excel.run(async (context) => { const chart = context.workbook.getActiveChartOrNullObject(); return readExcelChart(context, chart);});const maidr = convertExcelChart(snapshot); Copy
const snapshot = await Excel.run(async (context) => { const chart = context.workbook.getActiveChartOrNullObject(); return readExcelChart(context, chart);});const maidr = convertExcelChart(snapshot);
Read one chart into a snapshot.
Needs ExcelApi 1.12, for
ChartSeries.getDimensionValues; checkOffice.context.requirements.isSetSupported('ExcelApi', '1.12')first.