Photo from Unsplash
Originally Posted On: https://ironsoftware.com/csharp/excel/blog/compare-to-other-components/aspose-cells-alternative-by-ironxl/
What is Aspose Cells?
Aspose.Cells for .NET is an Excel Spreadsheet Programming API to speed up spreadsheet management and processing tasks. API supports the building of cross-platform applications having the ability to generate, modify, convert, render and print spreadsheets. Moreover, it does not rely on Microsoft Excel or any Microsoft Office Interop components to be installed and instead offers a robust set of APIs that deal with all Excel formats, as well as CSV and SpreadsheetML formats.
By integrating API, developers can perform basic tasks such as managing multiple worksheets, creating spreadsheet contents and styles from scratch, importing data onto the worksheets from different data sources, adding common and complex mathematical, financial and text formulas, manipulating and editing charts, pictures and comments, drawing objects, and much more.
How do you use Aspose Cells?
Aspose.Cells for .NET is a spreadsheet programming library that allows software developers to manipulate and convert spreadsheet files from within their own applications. A combination of APIs and GUI controls, Aspose.Cells for .NET speeds up Microsoft Excel® programming and conversion. Aspose.Cells for .NET supports the popular spreadsheet Microsoft Excel XLS, XLSX, , XLSB, XLTX, XLTM, XLSM, XML OpenOffice ods text file formats that your business uses every day. It also allows for the exporting of Excel files to PDF, XPS, HTML, MHTML, Plain Text and popular image formats, including JPEG, PNG, BMP and SVG images.
What is Aspose Cells for .NET?
Aspose.Cells for .NET enables your .NET, C#, ASP.NET, and VB.NET applications to create, format, render, print and convert Microsoft Excel® and OpenDocument spreadsheets (XLS, XLSX, ODS, etc.) to various supported formats, without the need to install Microsoft Excel or any third party software. Its powerful formula-calculation engine supports various standard and advanced MS Excel® formulas/functions.
IronXL and Aspose Cells Compared When Working with Excel
Are you a developer looking for great Excel libraries to help you create awesome applications utilizing Excel, and to create Workbooks and Worksheets filled with relevant data and formatted according to your needs?
Well, in this article I will compare two very good Excel libraries:
- IronXL
- Aspose Cells
Let’s get straight into it, shall we?
Aspose Cells and Excel
Aspose.Cells for .NET is a spreadsheet library that enables developers to manipulate and convert spreadsheet files from within their own applications. Aspose.Cells support all the popular spreadsheet file formats such as XLS, XLSX, XLSM, XLSB, XLTX, XLTM, CSV, SpreadsheetML, and ODS. Aspose.Cells also allow the exporting of Excel files to PDF, XPS, HTML, MHTML, Plain Text, TIFF, JPEG, PNG, BMP, SVG.
IronXL and Excel
IronXL from Iron Software features an easy API that developers can use to read, write and manipulate excel documents in .NET applications. One of the nice things about IronXL is that you can work with Excel without installing Microsoft Office Excel on your server or using Excel Interop. This makes working with Excel files in .NET very easy.
Common Library Features for the Aspose.Cells and IronXL Excel Libraries
The following table shows the common library features for IronXL and Aspose.Cells
Aspose.Cells | IronXL |
---|---|
Data Sorting in Excel | Data Sorting in Excel |
Excel Formulas | Excel Formulas |
Excel Cell Merging | Excel Cell Merging |
Data Filtering | Data Filtering |
Conditional formatting | Conditional formatting |
Excel Headers and Footers | Excel Headers and Footers |
Excel Cell Formatting | Excel Cell Formatting |
VBA | VBA |
Excel Charts | Excel Charts |
Comparing IronXL and Aspose.Cells Excel Functionalities
The following table compares features from Aspose.Cells and IronXL.
Aspose.Cells | IronXL |
---|---|
– | Saving and Exporting Excel files to and from JSON |
Manipulate Excel Columns | Manipulate Excel Columns |
Excel Formatting | Excel Formatting |
Excel Page Setup | Excel Page Setup |
Ranges | Ranges |
Comparing Licenses and Pricing for the IronXL and Aspose.Cells Excel Libraries
The following table lists the available licensing options for IronXL.
Aspose.Cells | IronXL |
---|---|
Evaluation License:
|
Free for Development |
Developer Small Business: – $999
|
Lite: – $499
|
Developer OEM: – $2997
Site Small Business: – $4995
Developer OEM: – $13986
|
Professional: – $999
|
Metered Small Business: – $1400 (Monthly)
Metered OEM: – $1400 (Monthly)
|
Unlimited: – $2,999
|
You can install both libraries by downloading them manually, NuGet, or the NuGet package Manager in Visual Studio. Here is a quick overview.
Aspose.Cells Installation
Downloading Aspose.Cells
To download Aspose.Cells, navigate to the following URL and click the Download button.
Installing Aspose.Cells with NuGet
To install Aspose.Cells through NuGet (and in case you haven’t noticed that the “Download” button above links you to the NuGet site), open the Visual Studio developer command prompt and enter the following:
Visual Studio NuGet Package Manager and Aspose.Cells
Use the following steps to install Aspose.Cells via the NuGet Package Manager in Visual Studio:
- Right-click the project in the Solution Explorer
- Select Manage NuGet Packages
- Browse for the Aspose.Cells Package
- Click Install
IronXL Installation
Downloading IronXL
To download IronXL, navigate to the following URL and click the “Download” button.
Installing IronXL with NuGet
To install IronXL through NuGet, open the Visual Studio developer command prompt and enter the following:
Install-Package IronXL.Excel
Visual Studio NuGet Package Manager and IronXL
Use the following steps to install IronXL via the NuGet Package Manager in Visual Studio:
- Right-click the project in the Solution Explorer
- Select Manage NuGet Packages
- Browse for your Package
- Click “Install”
Create and save Excel files with Aspose.Cells and IronXL
Creating an Excel file with Aspose.Cells
The following code demonstrates how to create a new Excel file and save it with Aspose.Cells. Add the following code:
Include the necessary namespaces:
using Aspose.Cells;
using System;
using System.Windows.Forms;
Because we have added the NuGet package for Aspose.Cells, we can now add its namespace so that we can work with it in Excel.
Add the next few lines:
private void button1_Click(object sender, EventArgs e)
{
var book = new Aspose.Cells.Workbook();
var sheet = book.Worksheets[0];
var cells = sheet.Cells;
cells["A1"].Value = "Hello World from Aspose.Cells";
book.Save("Aspose.Cells_Output.xlsx", SaveFormat.Xlsx);
}
The above code creates a new Aspose.Cells.Workbook object, and then it creates a Worksheet within the Workbook. It gets access to the Excel worksheets’ cells via its “cells” property, and then it finally writes a welcoming message in cell A1 of the first worksheet
Notice that in the file that was created, an extra Excel Worksheet named “Evaluation Warning” has been added containing the message shown below:
As mentioned earlier in Table 4, the Free Evaluation License includes 100 Workbooks only.
Creating an Excel file with IronXL
The following code demonstrates how to create a new Excel file and save it with IronXL. Add the following code:
Include the namespace:
using System;
using System.IO;
using System.Windows.Forms;
using IronXL;
Notice the inclusion of the IronXL. This is necessary for IronXL to work. Add the next few lines:
private void button2_Click(object sender, EventArgs e)
{
WorkBook workbook = WorkBook.Create(ExcelFileFormat.XLSX);
var sheet = workbook.CreateWorkSheet("IronXL Worksheet");
sheet["A1"].Value = "Hello World from IronXL;";
workbook.SaveAs("IronXL_Output.xlsx");
}
In the above code, a Workbook object is created with the file format XLSX. This format can be changed. Then a Worksheet named “IronXL Worksheet” is created and a value of “Hello World from IronXL” is placed inside cell A1. Lastly, the Workbook gets saved as IronXL_Output.xlsx.
Both libraries are easy to use when creating workbooks and saving them, and as you can see, there is also not much difference in terms of code.
Let’s take it a step further.
Converting Excel files with Aspose.Cells and IronXL
Converting Excel Files to PDF and HTML with Aspose.Cells
Aspose.Cells for .NET is capable of converting spreadsheets to PDF, XPS & HTML formats while maintaining the highest visual fidelity. The conversion process is simple yet reliable, thus making API the perfect choice for organizations that need to exchange documents in any of the industry-standard formats. The following code demonstrates how to convert Excel Files to PDF and HTML via Aspose.Cells. Add the following code:
Include the necessary namespaces:
using Aspose.Cells;
using System;
using System.Windows.Forms;
Add the next few lines:
private void button3_Click(object sender, EventArgs e)
{
var workbook = new Aspose.Cells.Workbook("Aspose.Cells_Output.xlsx");
workbook.Save("Aspose.Cells_Output.pdf", Aspose.Cells.SaveFormat.Pdf);
workbook.Save("Aspose.Cells_Output.html", Aspose.Cells.SaveFormat.Html);
}
Here, an existing Excel workbook gets loaded and exported to PDF and HTML formats. You will also notice the “Evaluation Warnings” in both formats.
Exporting an Excel file to an XML or a JSON file with IronXL
The following code demonstrates how to export an Excel file to an XML or a JSON file with IronXL. Add the following code:
Include the namespace:
using IronXL;
Add the next few lines:
private void button4_Click(object sender, EventArgs e)
{
WorkBook workbook = WorkBook.Load("IronXL_Output.xlsx");
workbook.SaveAsJson("IronXL_Output.json");
workbook.SaveAsXml("IronXL_Output.xml");
}
Here, an existing Excel Workbook object is loaded and then exported to JSON and XML formats.
Downloads
This project is available on GitHub.
IronXL vs Aspose.Cells Example
You can download the software product from this link.
Summary
Aspose.Cells support all the popular spreadsheet file formats such as XLS, XLSX, XLSM, XLT, XLTX, XLTM, CSV, SpreadsheetML, and ODS. Aspose.Cells also allow the exporting of Excel files to PDF, XPS, HTML, MHTML, Plain Text, and JPEG, PNG, BMP, SVG, TIFF. Aspose.Cells for .NET provides a comprehensive set of APIs for creating and manipulating all of the standard and custom chart types. Moreover, you may add different types of content, such as comments, pictures, OLE objects, shapes and controls to the cells, and convert charts to images.