While retrieving point data from Excel.Chart object, value of Chart.Point has General number format by default. Is there any way to get actual number format of Chart.Point value
const series: Excel.ChartSeriesCollection = chart.series;
series.load("items");
await context.sync();
let chartData = [];
let seriesIndex = 0;
for (const seriesItem of series.items) {
chartData[seriesIndex] = [];
seriesItem.load(["points", "dataLabels"]);
await context.sync();
const points = seriesItem.points;
points.load("items");
await context.sync();
const row = [];
await points.items.forEach(async (point) => {
point.load(["dataLabel", "value"]);
await context.sync();
row.push(point.value);
});
chartData[seriesIndex] = row;
++seriesIndex;
}
console.log(chartData);
});
When trying to read a chart as below
And inserting a new chart from the above read data
