Microsoft Office Interop (Excel Automation) is an option when creating/reading Excel files (XLS, XLSX, CSV) from C# or VB.NET application, but it has many drawbacks.
Issues, when using Microsoft Office Interop (Excel Automation) from C# or VB.NET, are that:
- It requires a license for Microsoft Office on every client machine.
- It requires that all client machines have the same version of Microsoft Excel installed.
- It works only on Windows operating systems.
- When using Automation, Microsoft Excel is loaded in the background, taking a few MB and loading a large number of files and DLLs.
- Microsoft Office applications (including Excel) were designed as UI applications and, because of that, API is very slow. Generating a single worksheet with 200 rows and 100 columns takes 239.4 seconds on our test machine.
- Microsoft doesn’t recommend using Excel Automation (or any Office Interop) on the server: https://support.microsoft.com/en-us/kb/257757
We are proud that our Excel .NET library is one of the best alternatives for Microsoft Office Interop (Excel Automation).
Better than Excel Automation
With Microsoft Office installed on most business desktops, it is tempting to use Microsoft Excel Interop. Look at the following table for good reasons not to do so:
|Microsoft Excel automation||GemBox.Spreadsheet component|
|Requires a license for Microsoft Excel on every client machine.||Requires that only the developer using our component has one GemBox.Spreadsheet developer license, even if the developed application is to be installed on thousands of client machines.|
|Requires that all client machines have the same version of Microsoft Excel installed.||Files generated with GemBox.Spreadsheet are compatible with Excel 97, Excel 2000, Excel XP, Excel 2003, Excel 2007, Excel 2010, Excel 2013, and OpenOffice, so any of these products can (but don’t have to) be installed on a client machine.|
|Works only on Windows operating systems.||With support for .NET Standard 2.0, GemBox.Spreadsheet works on Windows, Linux, Unix, and OSX operating systems (via .NET Core 2.0 that implements .NET Standard 2.0) and on Mono, Xamarin, and Universal Windows platforms (that implement .NET Standard 2.0).|
|When using automation, Excel is loaded in the background, taking a few MB and loading a large number of files and DLLs.||GemBox.Spreadsheet is a single component that takes 1 MB. An additional memory is allocated only when needed to perform certain operations.|
|Microsoft Excel was designed as a UI application and, because of that, API is very slow. Generating a single worksheet with 200 rows and 200 columns takes 240 seconds on our test machine.||GemBox.Spreadsheet is designed for processing large numbers of Excel files. The same test took 0.9 seconds on our test machine (266 times faster than Microsoft Excel).|
|Microsoft Excel API is exposed as COM object. This results in the same disadvantages as with calling any COM object from the managed code (type conversions, need for COM wrapper, bad integration with .NET Framework, etc.).||GemBox.Spreadsheet is a pure .NET component, designed and developed to conform to Microsoft standards for .NET libraries.|
When comparing and evaluating different XLSX, XLS, ODS, CSV reading and HTML, PDF and XPS reporting products, don't forget the following considerations:
Plain and fair licensing
We don't charge you additional server licenses. You can use our component for an unlimited number of projects (you don't need to purchase additional "OEM licenses") and we don't force you to purchase subscription packages.
Our licensing is very simple: every developer working with our component needs to be covered by developer license. We don't care if it is a Windows or web application, how many servers you use, or if you have just one customer or millions of customers.
In the case of desktop application, you don't want your user to wait 20 seconds for every single report. In the case of web application, you want your server to simultaneously support as many users as possible. Our test programs generate single XLS file with 200 rows and 200 columns of tabular data. Half of the values are strings and half are numbers, with 50% of cells having some cell style applied (font size and border). On our test machine the results are following:
- GemBox.Spreadsheet takes 0.9 seconds.
- Microsoft Excel automation takes 240 seconds (266 times slower).
Performance example is included in the GemBox.Spreadsheet Examples, so you are free to do the test yourself and see how our component performs with the tabular data that you require.
Clean and easy to use API
GemBox.Spreadsheet is a designed and developed to conform to Microsoft standards for .NET libraries. Caching also enables you to access the worksheet in a more natural way. For example, the same task of changing cell text orientation would be one line in GemBox.Spreadsheet:
ws.Cells[6, 0].Style.Rotation = 30;
and three lines in one of the competing products:
XLStyle someStyle = new XLStyle(book); someStyle.Rotation = 30; sheet[6, 0].Style = someStyle;
The latter is a hassle and forces you to think about Excel’s unique cell style limit. In other words, you will have to pay attention to not creating the same cell style again in a more complex worksheet.
GemBox.Spreadsheet works on Windows, Linux, Unix, and OSX operating systems (via .NET Core 2.0 that implements .NET Standard 2.0) and on Mono, Xamarin, and Universal Windows platforms (that implement .NET Standard 2.0).
100% managed code
Some similar products (and actually Microsoft Excel object) are old COM components with .NET RCW (Runtime Callable Wrapper). This brings many performance and interoperability disadvantages as every method call that you make goes through the wrapper until it reaches C++ code. On the other hand, our GemBox.Spreadsheet component is 100% managed, written entirely in C#, and designed to support both Visual Basic .NET and C# in equal manner.
GemBox.Spreadsheet Free delivers the same performance and set of features as the Professional version. However, the Free version is limited to 150 rows per sheet. You can use the free version for any purpose, including commercial applications.
If you want to see how fast and efficient GemBox.Spreadsheet performs for large files, you can enable Trial mode right from within the free version.
GemBox.Spreadsheet is a standalone .NET component for fast reading, writing, editing, converting and printing of XLSX, XLS, ODS, CSV, HTML, PDF, and XPS files using C# or VB.NET with one simple API.