Skip to content

aspose-cells/Aspose.Cells-for-C

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 

Repository files navigation

Nuget Nuget

C++ Library for Excel File Formats

Aspose.Cells for C++ is a cross-platform native assembly that can be deployed simply by copying it. You can use it to develop 32-bit (Windows® x86) & 64-bit applications in any development environment that supports C++, such as, Microsoft Visual Studio. You don't have to worry about other services or modules. It supports Excel 97-2003 (XLS), Excel 2007-2013/2016/365 (XLSX, XLSM, XLSB), OpenOffice XML, LibreOffice (ODS), and other formats such as CSV, TSV, and more.

Aspose.Cells for C++ Library allows you to work with the built-in as well as the custom document properties in Microsoft Excel. Supports high-quality conversion of Excel Workbooks to PDF/A compliant files. Work with formulas, pivot tables, worksheets, tables, ranges, charts, OLE objects and much more.

Aspose.Cells for C++ Library allows the developers to work with spreadsheet rows, columns, data, formulas, pivot tables, worksheets, tables, charts, and drawing objects from their own C++ applications.

Directory Description
Examples A collection of C++ examples that help you learn and explore the API features.

Excel File Processing Features

Read & Write Spreadsheets

Microsoft Excel: XLS, XLSX, XLSB
Text: CSV, TSV
OpenDocument: ODS
Others: HTML, MHTML

Save Spreadsheets As

Microsoft Excel: XLSM, XLTX, XLTM, XLAM
Fixed Layout: PDF, XPS
Images: JPEG, PNG, BMP, GIF, EMF, SVG

Get Started with Aspose.Cells for C++

Are you ready to give Aspose.Cells for C++ a try? Simply execute Install-Package Aspose.Cells.Cpp from Package Manager Console in Visual Studio to fetch the NuGet package. If you already have Aspose.Cells for C++ and want to upgrade the version, please execute Update-Package Aspose.Cells.Cpp to get the latest version.

Convert XLS to XLSX, XLSB & CSV

Aspose::Cells::Startup();

//Output directory path
U16String dir = "..\\Data\\Output\\";

// load the file to be converted
Workbook book(u"template.xls");
// save in different formats
book.Save(dir + "output.xlsx", SaveFormat::Xlsx);
book.Save(dir + "output.xlsb", SaveFormat::Xlsb);
book.Save(dir + "output.csv", SaveFormat::CSV);

Aspose::Cells::Cleanup();

Create a Custom Excel Chart

Aspose::Cells::Startup();

// create a new workbook
Workbook workbook;

// get first worksheet which is created by default
Worksheet worksheet = workbook.GetWorksheets().Get(0);

// add sample data
worksheet.GetCells().Get("A1").PutValue(50);
worksheet.GetCells().Get("A2").PutValue(100);
worksheet.GetCells().Get("A3").PutValue(150);
worksheet.GetCells().Get("A4").PutValue(110);
worksheet.GetCells().Get("B1").PutValue(260);
worksheet.GetCells().Get("B2").PutValue(12);
worksheet.GetCells().Get("B3").PutValue(50);
worksheet.GetCells().Get("B4").PutValue(100);

// add a chart to the worksheet
int chartIndex = worksheet.GetCharts().Add(Aspose::Cells::Charts::ChartType::Column, 5, 0, 20, 8);

// access the instance of the newly added chart
Chart chart = worksheet.GetCharts().Get(chartIndex);

// add SeriesCollection (chart data source) to the chart ranging from A1 to B4
chart.GetNSeries().Add("A1:B4", true);

// set the chart type of 2nd NSeries to display as line chart
chart.GetNSeries().Get(1).SetType(Aspose::Cells::Charts::ChartType::Line);

// save the Excel file
workbook.Save("output.xlsx");

Aspose::Cells::Cleanup();

Home | Product Page | Docs | Demos | API Reference | Examples | Blog | Search | Free Support | Temporary License

About

Aspose.Cells for C++ examples, plugins and showcases

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published