Skip to main content Skip to footer
C# .NET Excel Spreadsheet API Library Examples

High-Speed C# .NET Excel Spreadsheet API Library

Document Solutions for Excel (DsExcel, previously GcExcel), .NET Edition, allows you to programmatically create, edit, import, and export Excel spreadsheets in your C# .NET 6+, .NET Core, .NET Framework, and Xamarin cross-platform applications using this fast spreadsheet API.

  • Create, load, edit, and save Excel XLSX spreadsheets
  • Save to XLSX, PDF, HTML, CSV, JSON, Images, and SpreadJS files
  • Based on the Excel Object Model with zero Excel dependencies
  • Deploy locally, inhouse or to Cloud, including Azure and AWS
  • Use the Templates to create custom Excel reports
  • Includes a JavaScript Data Viewer to open and view data documents on the client-side
Download Free Trial (V 7.2.4) Request A Demo

Looking for a Desktop .NET Spreadsheet UI? Check out Spread.NET.

Overview

A C# .NET Excel spreadsheet API library is a programming interface that allows developers to programmatically create and manipulate Excel documents at scale. Document Solutions for Excel, .NET Edition (DsExcel .NET) allows developers to import/export, create reports & templates, and deploy spreadsheets across .NET applications.

The Benefits of a C# .NET Excel API

High-Speed

Fast, Lightweight API Architecture

Use this small-footprint, high-performance spreadsheet server-side Excel-like API Library to quickly create, open, edit, convert, and share Microsoft Excel-compatible spreadsheets using C# or other .NET languages. Integrate with client-side Data Viewer to load and view the generated Excel file

Customizable Templates

Flexible Templates and Themes

Let users leverage the power of customizable templates, themes, configurable components, summary data, custom styles, embedded drawing objects, integrated calculation engine, and more.

Excel Compatibility

Seamless Excel Compatibility

Lose nothing on import. Pivot tables, comments, charts, conditional formatting, data validation, filters, formulas, shapes, pictures, slicers, sparklines, and tables stay intact.

Full .NET Support

Full .NET Support for Windows, Linux, and Mac

Develop for all .NET platforms and operating systems with a single code base. Use in your apps for .NET 6+, .NET Framework, Mono, Xamarin.iOS, and Xamarin Android.

Document Object Model

Document Object Model

Based on the extensive Excel Object Model, the interface-based API allows you to import, calculate, query, generate, and export any spreadsheet scenario. With the VS Tools for Office-style API, you can create custom styles using the same elements as VS Tools for Office.

Deploy To The Cloud

Deploy Excel Spreadsheet Apps to the Cloud

Cloud-based deployment means you can be everywhere - with NuGet and DsExcel .NET, you can deploy to Azure, AWS, and AWS Lambda.

Import only data only from Excel files using C# .NET Spreadsheet API

Import Data Only from Excel Files

Try new ImportData() function to import just the data from Excel files without loading the whole object model. Faster and efficient way to import data.

Learn More TRY THE DEMO
Custom Reports using Excel (.xlsx) Templates in C# .NET

Custom Reports using Excel Templates in C# .NET

Define Excel templates to automate and generate comprehensive Excel reports such as invoices, sales reports, receipts, shipping labels, purchase orders, and more.

LEARN MORE Try the Demo
Apply Advance Pivot Table Options using C#/VB

Apply Advance Pivot Table Options

Filter Pivot tables programmatically and narrowing down data to focus on specific criteria.

TRY THE DEMO
Create professional Excel Expense Reports using C# .NET Spreadsheet APIs

Travel Expense Report

Add tables, formatting, images, and formulas to Excel sheet for complete professional reports with our .NET 6+ Excel API Library.

TRY THE DEMO
Generate Paginated Spreadsheet Reports using a C# .NET Excel API Library

Generate Paginated Spreadsheet Reports

Generate well-organized Medical reports, Product Catalogs, Lists, and more using DsExcel's Paginate spreadsheet reports feature. This feature can set a fixed number of rows or on-page size into multiple worksheets. Configure Page/Group Header/Footer, set grouping properties, keep together grouped content, and more.

Learn More Try the Demo
Create Financial KPI Reports Programmatically using a C# .NET Excel API

Financial KPI Report

Use icons, cell formatting, images, and calculations to create dashboard-type reports to measure company performance.

TRY THE DEMO
Programmatically Create a Customer Profitability Analysis Report Using C# .NET Excel API

Customer Profitability Analysis Report

Create matrix-like spreadsheets, complete with calculations, figures, sparklines, tables, and color themes.

TRY THE DEMO
Generate Invoice Forms using a C# .NET Excel API

Invoice Forms

Quickly create simple forms, like invoices, with the built-in templates with our C# .NET Excel API.

TRY THE DEMO
Convert Excel Templates to PDF Forms with HTML5 Input Types using a C# .NET Excel API

Convert Excel Templates to PDF Forms with HTML5 Input Types

DsExcel .NET library provides tools to create templates and define form fields in the templates, and utilize validation in the fields to ensure data accuracy and consistency. Messages can be assigned based on the validation type, like required fields or specific format types.

TRY THE DEMO
Import and Export SpreadJS .sjs files using C#

Import/Export SpreadJS .sjs Files

Import, export, and control commonly used spreadsheet features from a SpreadJS (.sjs) file to Excel (.xlsx) and vice-versa using DsExcel .NET; this includes:

  • Formulas and Validations
  • Styles and Formatting
  • Range, Table, Pivot Table
  • Chart, Shape, Picture
  • Form Controls
  • Notes, Comments, and more
Learn More Try the Demo

Top Features of a C# .NET Excel API

Import and Export Excel in a C# .NET Application

Seamlessly import and export Excel-compatible XLSX, XLTX, XLSM files with no Excel dependency, with all formulas, formatting, and other settings.

LEARN MORE

Workbooks and Worksheets

Create, import, export, use passwords, add sheets, cut and copy ranges, copy and move worksheets, activate, configure, delete, protect, and add iterative calculations.

LEARN MORE

Formulas (450+ Excel Functions)

Use hundreds of built-in functions and operators to perform complex calculations, add external formulas, or build your own custom functions and create what you need

LEARN MORE

PDF Export

Export Excel .xlsx spreadsheets to PDF at server side with various PDF options, including security settings and embedded form controls with HTML5 tags for autocomplete.

LEARN MORE

Excel Workbook Optimization

Exclude empty cells, user-defined but never used cell styles or defined names, and reduce the size of your workbook while saving it.

Learn More

Showcase Demos

Explore complete code demonstrating how to generate an Excel file, or you may have your own Excel files and just want to open and update some of its contents at server side.

LEARN MORE

Quick Start

In this tutorial, we create a real-life scenario with Document Solutions for Excel to give you a fundamental understanding of what our .NET Excel API can do.

LEARN MORE

Import and Export Excel in a .NET Application

Seamlessly import and export Excel-compatible XLSX, XLTX, XLSM files with no Excel dependency, with all formulas, formatting, and other settings.

LEARN MORE

PDF Export

Export Excel .xlsx spreadsheets to PDF at server side with various PDF options, including security settings and embedded form controls with HTML5 tags for autocomplete.

LEARN MORE

Image Exporting

Export a worksheet, cell range, shape, or chart to an image file on the server side in your application with various Image save options.

LEARN MORE

Templates

DsExcel .NET introduces new Templates Support with comprehensive syntax and API to easily bind Excel documents to data and generate advanced and complex custom Excel reports.

LEARN MORE

Data Binding

DsExcel .NET supports one-way data binding with a cell, a worksheet, and Table binding to .NET data sources to easily fill in your data automatically.

LEARN MORE

Import Data

New ImportData() function to quickly import just the data values from a specified range in an Excel file without loading the whole object model.

LEARN MORE

Import/Export Excel features to/from SpreadJS

Seamless import and export of new SpreadJS file format (.sjs) to Excel files using .NET and various Open/Save options available.

LEARN MORE

Forms

Create AcroForm fields, including HTML5 autocomplete types, to submit data forms to a server, import XML data, and import form data submitted on the client to a PDF.

LEARN MORE

PDF Export

Export Excel .xlsx spreadsheets to PDF at server side with various PDF options, including security settings and embedded form controls with HTML5 tags for autocomplete.

LEARN MORE

Page Setup

Get and set Page Setup attributes (left margin, bottom margin, paper size, and so on) on Excel workbook and import/export in XLSX and/or print to PDF or directly to a printer in Windows.

LEARN MORE

Templates

DsExcel .NET introduces new Templates Support with comprehensive syntax and API to easily bind Excel documents to data and generate advanced and complex custom Excel reports.

LEARN MORE

Workbook Views

Programmatically set three predefined Workbook views, Normal, Page Layout, and Page Break Preview, which take effect on loading in Excel.

LEARN MORE

Print Excel file to printer (Windows)

Directly print Excel file to printer using interfaces IWorkbook.PrintOut and PrintOutOptions (supported in Windows environments only).

LEARN MORE

Formulas (450+ Excel Functions)

Use hundreds of built-in functions and operators to perform complex calculations, add external formulas, or build your own custom functions and create what you need.

LEARN MORE

Dynamic Array Formula

Use 7 new Dynamic Array Formula functions and the new '#' operator to pass and return multiple values from functions and spill results in a range of cells.

LEARN MORE

Custom Function

Custom functions allow you to easily create new calculation functions for use in cell formulas using custom logic to return a value in your .NET app.

LEARN MORE

Formula Parser

Create, parse and modify formulas with  GrapeCity.Document.Excel.Expression namespace to parse the formula expressions.

LEARN MORE

Table Formulas

Use absolute or relative structured references in formulas to reference to table cells for formulas that are more intuitive and easier to understand.

LEARN MORE

Pivot Table Formulas

Use the new method GenerateGetPivotDataFunction from IRange interface to generate formulas using the GETPIVOTDATA function to get pivot table values.

LEARN MORE

Add Goal Seek to Spreadsheets

Programmatically determine the necessary input value to achieve a desired result, by setting a target output.


LEARN MORE

Linked Picture

A linked picture (also knows as Camera Shape) can be created using a reference to the actual data, table, or chart in your final dashboard.

LEARN MORE

Formula Tracing

Trace the formula references in your worksheet to find the Dependent and Precedent cells and automate your formula auditing to ensure calculation accuracy.

LEARN MORE

Ignore Errors in Excel

Ignore range errors in Excel and hide the annoying green triangle.

LEARN MORE

Excel Calculation Mode

Programmatically modify the Excel’s mode of calculation to Automatic, Partial, or Manual.

LEARN MORE

Workbooks and Worksheets

Create, import, export, use passwords, add sheets, cut and copy ranges, copy and move worksheets, activate, configure, delete, protect, and add iterative calculations.

LEARN MORE

Cell Rich Text

Apply rich text formatting using the IRichText interface including multiple font styles, colors, sizes, subscript and superscript text in the cells of the worksheet.

LEARN MORE

Templates

DsExcel introduces new Templates Support with comprehensive syntax and API to easily bind Excel documents to data and generate advanced and complex custom Excel reports.

LEARN MORE

Themes

DsExcel API lets you apply built-in or custom Office themes to change the appearance of a workbook by replacing the colors and styles in one quick and easy operation.

LEARN MORE

Conditional Formatting

Create conditional formatting rules for individual cells or a range of cells based on cell values or a custom formula, including data bars, color scales, and icon sets.

LEARN MORE

Data Validation

Validate data by restricting the format and values that can be entered in cells of a worksheet, or create a drop-down list for the cell.

LEARN MORE

Range Operations

Get and set all style, formula, and other settings on cells, rows or columns in .NET Excel documents with the help of Range property of the IWorksheet interface.

LEARN MORE

Formatting

DsExcel provides many style, border, and format properties to customize the appearance of a range in your .NET Excel spreadsheet.

LEARN MORE

Tables

Manage Tables independently in Excel worksheets, format rows & columns, include totals row, and perform calculations using structured table column references.

LEARN MORE

Graphics

Use linear and gradient brushes and pattern fills with Shapes and Pictures in Excel workbooks for reporting, data visualization, and more.

LEARN MORE

Charts

DsExcel provides a comprehensive charting API to add all types of charts in Excel worksheets, including support for advanced template reporting and data binding.

LEARN MORE

Shapes

Embed Shapes and Pictures in a worksheet. You can insert arrows, lines, charts, slicers, pictures, general shapes and connectors, and group shapes.

LEARN MORE

Pictures

Add a picture to a worksheet using the AddPicture method of the worksheet's Shapes collection, or delete, cut, copy and duplicate pictures in the worksheet.

LEARN MORE

Templates

DsExcel introduces new Templates Support with comprehensive syntax and API to easily bind to Images and generate advanced and complex custom Excel reports.

LEARN MORE

Linked Picture

A linked picture (also known as Camera Shape) can be created using a reference to the actual data, table, or chart in your final dashboard.

LEARN MORE

Barcodes

DsExcel supports 11 types of barcodes that can be added using a simple formula. Convert the formula result to picture using ConvertBarcodeToPicture() method.

LEARN MORE

Workbooks and Worksheets

Create, import, export, use passwords, add sheets, cut and copy ranges, copy and move worksheets, activate, configure, delete, protect, and add iterative calculations.

LEARN MORE

Templates

DsExcel introduces new Templates Support with comprehensive syntax and API to easily bind Excel documents to data and generate advanced and complex custom Excel reports.

LEARN MORE

Forms

Create AcroForm fields, including HTML5 autocomplete types, to submit data forms to a server, import XML data, and import form data submitted on the client to a PDF.

LEARN MORE

Range Operations

Get and set all style, formula, and other settings on cells, rows or columns in .NET Excel documents with the help of Range property of the IWorksheet interface.

LEARN MORE

Formatting

DsExcel provides many style, border, and format properties to customize the appearance of a range in your .NET Excel spreadsheet.

LEARN MORE

Dynamic Array Formula

Use 7 new Dynamic Array Formula functions and the new '#' operator to pass and return multiple values from functions and spill results in a range of cells.

LEARN MORE

Tables

Manage Tables independently in Excel worksheets, format rows & columns, include totals row, and perform calculations using structured table column references.

LEARN MORE

Pivot Tables

Add Pivot Table to Excel workbook for data summarization and aggregation, to automatically count, total, or average the data stored in a spreadsheet.

LEARN MORE

Conditional Formatting

Create conditional formatting rules for individual cells or a range of cells based on cell values or a custom formula, including data bars, color scales, and icon sets.

LEARN MORE

Grouping

Summarize large amounts of information in groups of columns and/or rows that expand and collapse so that complex spreadsheets are easier to navigate.

LEARN MORE

Cell Rich Text

Apply rich text formatting using the IRichText interface including multiple font styles, colors, sizes, subscript and superscript text in the cells of the worksheet.

LEARN MORE

Data Validation

Validate data by restricting the format and values that can be entered in cells of a worksheet, or create a drop-down list for the cell.

LEARN MORE

Find and Replace

Find and Replace text or formulas in a worksheet with various options including case, whole or partial match, match byte, replace format, search format, and more.

LEARN MORE

Filtering

DsExcel supports all types of filters including Date, Text, Number, Color, Icon, and more in tables or on a range using a worksheet range filter.

LEARN MORE

Data Binding

DsExcel supports one-way data binding with a cell, a worksheet, and Table binding to .NET data sources to easily fill in your data automatically.

LEARN MORE

Sorting

DsExcel provides the Sort method to perform data sorting on a range of cells by value, color, or icon, and supports sorting by column or row in a worksheet.

LEARN MORE

Slicer

Slicers are visual filters that you can use to filter a table or pivot table. Add built-in and custom slicer styles in Excel workbooks to create interactive reports.

LEARN MORE

Comments

DsExcel enables users to write Comments for cells to add metadata information about the data it contains, which can show as a popup or sticky note.

LEARN MORE

Hyperlinks

Link to a cell location in a worksheet, a web page, an external file, or an email address using a Hyperlink in a cell or shape to create a table of contents and more.

LEARN MORE

Themes

DsExcel API lets you apply built-in or custom Office themes to change the appearance of a workbook by replacing the colors and styles in one quick and easy operation.

LEARN MORE

Threaded Comments

Add, reply, and delete Threaded Comments, as well as move to next comment, move to previous comment and many more such operations.

LEARN MORE

Templates

DsExcel introduces new Templates Support with comprehensive syntax and API to easily bind Excel documents to data and generate advanced and complex custom Excel reports.

LEARN MORE

Forms

Create AcroForm fields, including HTML5 autocomplete types, to submit data forms to a server, import XML data, and import form data submitted on the client to a PDF.

LEARN MORE

Document Solutions Data Viewer

Open and view data documents (XLSX, CSV, SpreadJS) in web applications. 




Learn More

Excel Form Controls

Create Excel forms with standard Form controls and collect data from your users.

 

Learn More

Pivot Tables

Add Pivot Table to Excel workbook for data summarization and aggregation, to automatically count, total, or average the data stored in a spreadsheet.

LEARN MORE

Custom Function

Custom functions allow you to easily create new calculation functions for use in cell formulas using custom logic to return a value in your .NET app.

LEARN MORE

Dynamic Array Formula

Use 7 new Dynamic Array Formula functions and the new '#' operator to pass and return multiple values from functions and spill results in a range of cells.

LEARN MORE

Formula Parser

Create, parse, and modify formulas with GrapeCity.Documents.Excel.
Expressions namespace to parse the formula expressions.

LEARN MORE

Charts

DsExcel provides a comprehensive charting API to add all types of charts in Excel worksheets, including support for advanced template reporting and data binding.

LEARN MORE

PDF Export

Export Excel .xlsx spreadsheets to PDF at server side with various PDF options, including security settings and embedded form controls with HTML5 tags for autocomplete.

LEARN MORE

Linked Picture

A linked picture (also knows as Camera Shape) can be created using a reference to the actual data, table, or chart in your final dashboard.

LEARN MORE

SpreadJS Viewer

See how to use DsExcel on the server side to import/export Excel template files with SpreadJS as a viewer or editor in the browser (client side).

LEARN MORE

SpreadJS Feature Support

DsExcel supports SpreadJS features, adding more compatibility with the client-side SpreadJS product. View the complete supported features list here.

LEARN MORE

SpreadJS JSON I/O

DsExcel .NET supports more powerful and deep-level JSON I/O. Users could use JSON to interact with SpreadJS in a more flexible way.

Learn More

Import/Export Excel Features To/From SpreadJS

Seamless import and export of new SpreadJS file format (.sjs) to Excel files using .NET and various Open/Save options available.

Learn More

Document Solutions Data Viewer

Check out the new Document Solutions Data Viewer (DsDataViewer) to view multiple data documents on the web. Take advantage of the seamless API to embed the JavaScript data viewer in cross-platform applications.

Learn More Try the Demos

Explore the Advanced Features of a C# .NET Excel API

The demos with DsExcel include step-by-step instructions on using the spreadsheet API. Each main feature demo link contains several demos that show how to use a particular feature.

It also showcases numerous API features and includes code samples you can download and apply now. Click the button below to learn more.
Launch The Full Demo

Trusted by the World's Leading Companies

"The speed to build what we needed and the level of ease of use of controls are why we chose GrapeCity [now known as MESCIUS]. It was a perfect fit."

Spiro Skias - CGI