In this example, we will explore how to convert Excel Chart to JPEG in C++. Charts are good way of representing the information and you can add charts in MS Excel. You can save the chart in Excel to JPEG in C++ using simple API calls in any operating systems like Microsoft Windows and Linux etc.
Steps to Convert Excel Chart to JPEG in C++
- Install Aspose.Cells.Cpp with NuGet package Manager tool
- Include reference to the Aspose::Cells namespace
- Instantiate Workbook Class object and load the Excel file with chart inside it
- Instantiate the Chart Class object to access the chart inside selected worksheet
- Save XLSX Chart to JPEG in C++
Using the following simple example, you can convert Excel chart to JPG in C++ very quickly and easily in few API calls. You may also export the chart as image using C++ to PNG and BMP image formats as well.
Code to Convert Excel Chart to JPEG in C++
In previous example, we learnt about How to Convert XLSX to XPS using C++. This examples focuses on how to convert XLSX chart to JPEG in C++.