IronSoftware
  • Products
    Create, read, and edit PDFs Image to text in 127 languages Read and write QR & Barcodes No Office Interop required Extract structured data from websites 5 for the Price of 2 All 5 .NET product licenses from $998 Save 60% with Iron Suite Iron Suites - Donate $50
  • About Us
  • Contact Us

205 N. Michigan Ave. Chicago, IL 60611, USA +1 (312) 500-3060

  • Home
  • Licensing
  • EULA
  • Support & Update Extensions
  • Get Started
  • Features
  • Code Examples
  • Tutorials
  • FAQ
  • Troubleshooting
  • API Reference
  • Search
  • Free NuGet Download
IronXL - Excel Library for C# .Net IronXL - Excel Library for C# .Net
  • Home
  • Licensing
    • Licensing
    • EULA
    • Support & Update Extensions
  • Docs
    • Search
    • Get Started
    • Features
    • Code Examples
    • Tutorials
    • FAQ
    • Troubleshooting
    • API Reference
    • Search
  • Search
  • Free NuGet Download Total downloads: 179,360
Message's icon
IronXL
Code Examples
  1. IronXL
  2. Code Examples
  3. Convert Excel: XLS, CSV and XLSX
IronXL
Free for development from NuGet

Install with NuGet nuget.org/packages/IronXL.Excel

PM > Install-Package IronXL.Excel

Explore the Docs

  • Get Started
  • Features
  • Code Examples
    • How to Read an Excel File in C#
    • Using C# to Create Excel Files in .Net
    • Use C# to Open & Write an Excel File
    • License Keys
    • Create an XLSX File
    • Work with Excel in .NET Core
    • Export to Excel in C#
    • Read XLSX File C#
    • Work with Excel in C# without Interop
    • Write Excel Values in .NET
    • Open Excel Worksheets in C#
    • Parse Excel Files in C#
    • Read Excel File Example
    • Work with VB .NET Excel Files
    • Add Rows & Columns in Excel C# Docs
    • Import Excel Data in C#
    • Generate Excel Files in C#
    • Create Excel Documents in C#
    • Edit Excel Files in C#
    • Merge Cells in Excel C# Documents
    • Create Excel Charts in C#
    • Read a CSV in C#
    • Write CSV in .NET
    • Use a CSV parser in C#
    • Create a CSV file using C#
    • Convert a Data Table to CSV
    • Convert XLSX to CSV, JSON, XML
    • Setup on macOS
    • Setup on AWS
    • Setup on Azure
    • Setup on Docker
    • Setup on Linux
    • Troubleshooting Guides
      • Apply a license key in IronXL
      • File Size Limits
    • Product Release Notes
      • IronXL v2021.11.0
      • IronXL v2021.12.0
      • IronXL v2022.3.0
      • IronXL v2022.6.6825
  • API Reference
Read Excel Files without Interop
Excel Worksheets
Excel Range Cells
Create a new Excel File
Convert Spreadsheet File Types
Excel to SQL via System.Data.DataSet
Excel to SQL and DataGrid via DataTable
Excel Conditional Formatting
Convert XLS to XLSX in C#
Protect Excel Files
Excel Formulas in C#
Save Excel to Database
Edit Excel Metadata in C#
Update Excel Database Records
Style Excel Cell Borders & Fonts
Sort Excel Ranges in C#
Repeat Excel Rows & Columns
Read XLSX Files
Excel Print Setup
Preserve Excel Macros in XLSM
Excel Number Format
Load Excel From SQL Database
Combine Excel Ranges
Select Excel Range
Generate Excel Files
XLSX to XLSM with Macros
Convert Excel to HTML
Import Export Excel
Aggregate Excel Functions
CSV to Excel
Create Excel Scatter Chart
Create Excel Line Chart
Create Excel Bar Chart
Freeze Panes in Excel
Create Excel Worksheet
Copy Excel Worksheets

Convert Excel to HTML

using IronXL;
using IronXL.Options;

WorkBook workbook = WorkBook.Load("test.xlsx");

var options = new HtmlExportOptions()
{
    //This is how we can make row/column numbers visible in html document
    OutputRowNumbers = true,
    OutputColumnHeaders = true,
    OutputHiddenColumns = true,

    //This is how we can make hidden rows/columns visible in html document
    OutputHiddenRows = true,
    OutputLeadingSpacesAsNonBreaking = true
};

//This is how we can export workbook to the HTML file
workbook.ExportToHtml("workbook.html",options);
Imports IronXL
Imports IronXL.Options

Private workbook As WorkBook = WorkBook.Load("test.xlsx")

Private options = New HtmlExportOptions() With {
	.OutputRowNumbers = True,
	.OutputColumnHeaders = True,
	.OutputHiddenColumns = True,
	.OutputHiddenRows = True,
	.OutputLeadingSpacesAsNonBreaking = True
}

'This is how we can export workbook to the HTML file
workbook.ExportToHtml("workbook.html",options)
Read more
Install-Package IronXL.Excel

Convert Excel to HTML

How to convert "Excel to HTML" in C#.
Previous Example
Next Example

Ready to get started? Version: 2022.6 just released

Free NuGet Download Total downloads: 179,360 View Licenses >
Try IronXL for Free
Get Set Up in 5 Minutes
C# Nuget Library for PDF
Install with NuGet
Version: 2022.6
Install-Package IronXL.Excel
nuget.org/packages/IronXL.Excel/
  1. In Solution Explorer, right-click References, Manage NuGet Packages
  2. Select Browse and search "IronXL"
  3. Select the package and install
C# PDF DLL
Download DLL
Version: 2022.6
Download Now
Manually install into your project
  1. Download and unzip IronXL to a location such as ~/Libs within your Solution directory
  2. In Visual Studio Solution Explorer, right click References. Select Browse, "IronXL.dll"
Licenses from $499

Have a question? Get in touch with our development team.

Now that you’ve downloaded IronXL
Want to deploy IronXL to a live project for FREE?
Not ready to buy?

Want to deploy IronXL to a live project for FREE?

What’s included?
30 days of fully-functional product
Test and share in a live environment
No restrictions in production
Get your free 30-day Trial Key instantly.
Thank you.
If you'd like to speak to our licensing team:
Schedule a call
Have a question? Get in touch with our development team.
No credit card or account creation required
Your Trial License Key has been emailed to you.
Not ready to buy?
Thank you.
View your license options:
Thank you.
If you'd like to speak to our licensing team:
View License
Schedule a call
Have a question? Get in touch with our development team.
Have a question? Get in touch with our development team.
Want to deploy IronXL to a live project for FREE?
Not ready to buy?

Want to deploy IronXL to a live project for FREE?

What’s included?
30 days of fully-functional product
Test and share in a live environment
No restrictions in production
Get your free 30-day Trial Key instantly.
Thank you.
If you'd like to speak to our licensing team:
Schedule a call
Have a question? Get in touch with our development team.
No credit card or account creation required
Your Trial License Key has been emailed to you.
Not ready to buy?
Download IronXL free to apply
your Trial Licenses Key
Thank you.
If you'd like to speak to our licensing team:
Install with NuGet View Licenses
Schedule a call
Licenses from $499. Have a question? Get in touch.
Have a question? Get in touch with our development team.
Free 30-Day Trial Key

Fully-functional product, get the key instantly

IronXL for .NET

The Excel API you need, without the Office Interop hassle.

Search

Documentation

  • Code Examples
  • API Reference
  • FAQ
  • Features
  • Blog
  • Credits
  • Product Brochure

Tutorials

  • Get Started
  • Read an Excel File in C#
  • Create Excel Files in .Net

Licensing

  • Buy a License
  • Support Extensions
  • Resellers
  • License Keys
  • EULA

Try IronXL Free

  • Download on NuGet
  • Download DLL
  • 30-Day Trial License

When you need your PDF to look like HTML, fast.

Tesseract 5 OCR in the languages you need, We support 127+.

When you need to read, write, and style, QR & Barcodes, fast.

The Excel API you need, without the Office Interop hassle.

The power you need to scrape & output clean, structured data.

The complete .NET Suite for your office.

  • IRONSUITE
  • |
  • IRONPDF
  • IRONOCR
  • IRONBARCODE
  • IRONXL
  • IRONWEBSCRAPER
IronSoftware
205 N. Michigan Ave. Chicago, IL 60611 USA +1 (312) 500-3060
  • About Us
  • Contact Us

Supporting Teamseas

Copyright © Iron Software LLC 2013-2022

  • Terms
  • Privacy

Thank you!

Your license key has been delivered to the email provided. Contact us

48-Hour Upgrade Offer:

Save 50% on a
Professional Upgrade

Go Professional to cover 10 developers
and unlimited projects.

Upgrade to Professional

Upgrade

Professional

$600 USD

$299 USD


  • 10 developers
  • 10 locations
  • 10 projects