Tools We Need
- Visual Studio
Spire.XLS is a professional Excel component which enables developers/programmers to fast generate, read, write and modify Excel document for .NET and Silverlight.
Download Spire.XLS Here
How to Convert Excel to HTML with Spire.XLS by Using C#
Make sure Spire.XLS and Visual Studio are correctly installed on system. Follow the simple guide below to convert Excel to HTML.
Step 1 Create Project
Create a C# project in Visual Studio and Add Spire.Pdf.dll as reference. The default setting of Spire.Pdf.dll is placed under "C:\Program Files\e-iceblue\Spire.Pdf\Bin”. Select assembly Spire.Pdf.dll and click OK to add it to the project.
static void Main(string args)
Step 2 C# Excel to HTML
Spire.XLS presents an easy solution to convert Excel to HTML. First, load Excel file from local PC. Then, use Spire.XLS to save the Excel file as HTML format. Spire.XLS will remain all the styles from the original Excel files.
Workbook workbook = new Workbook();
Worksheet sheet = workbook.Worksheets;
Step 3 Launch Project
Press F5 to start the project and then an HTML file will generated in the project folder, bin->debug.
Spire.XLS is a professional Excel component which enables developers/programmers to fast generate, read, write and modify Excel document for .NET and Silverlight. It supports C#, VB.NET, ASP.NET, ASP.NET MVC and Silverlight. Click to learn more...