Create Microsoft® Excel Charts and Convert to Images via C++
Convert Excel document charts to images as well as create charts including Pie, Pyramid, Line and Bubble charts within C++ based applications.
Using Excel charts, one can get the bigger picture and analyse data easily for taking right decisions. C++ Excel Library supports creating different charts listed by enum Aspose::Cells::Charts::ChartType including area, bar, pie, pyramid, line and bubble charts. Moreover, For conversion of charts to images, API provides a ToImage mehtod into required image format.
Create Excel Charts
Process of creating Excel chart is, create an instance of the IWorkbook class and select the desired Worksheet . Add the chart using Add method with relevant parameters including chart type. Access the chart via index and Add the data source for chart.
C++ Code to Create Excel Charts
Convert Charts to Images
For converting charts process is, first create chart as of relevant type using above code or access it from relevant sheet. Define the output saving path for image and use the ToImage method for conversion.