Set the Values Format Code of Chart Series with Golang via C++
Contents
[
Hide
]
Possible Usage Scenarios
You can set the values format code of chart series using the Series.GetValuesFormatCode() property. This property is not only useful for series that are based on a range within the worksheet, but it also works well for series created with an array of values.
Set the Values Format Code of Chart Series
The following sample code adds a series to an empty chart that previously had no series. It adds the series using an array of values. After adding the series, it formats it with the code $#,##0 using the Series.GetValuesFormatCode() property, and the number 10000 becomes $10,000. The screenshot shows the effect of the code on the sample Excel file and output Excel file after execution.
