In this brief example, we will check how to convert XLSX to XPS using C++. Excel files are commonly saved with XLSX or XLS file extensions and you can process both file formats by adopting similar steps in the following code snippet. You do not need to install MS Excel to perform the Excel to XPS conversion in C++.
Steps to Convert Excel to XPS using C++
- Install Aspose.Cells.Cpp package with NuGet package Manager tool
- Add reference to the Aspose::Cells namespace
- Initialize the Workbook Class instance to load the source XLSX file
- Convert Excel to XPS in C++ using SaveFormat enumeration
Using the following simple example, you can save Excel file to XPS using C++ very quickly and easily in few API calls.
Code to Convert Excel File to XPS using C++
In previous example, we have explored How to Convert Excel to PDF using C++. Whereas, in this topic we have learned about Excel to XPS conversion in C++.