Forums

Overview » C# » How to Use C# Convert Excel to HTML
Reply

How to Use C# Convert Excel to HTML

Wallace Stephen
Member



Since: 23 Nov 2010
Posts: 63
Posted 17 Jun 2011 05:38:33

Convert excel to html is very easy. A lot of online Excel to HTML converter can do that job. But, if you want to have a hundreds batch conversion, or want to convert after edit, set format and so on, that online converter can not help you. But through Spire.XLS, a .NET excel library, you can easily do the jobs mentioned above and more others. Now use the code below, you can easily convert Excel to HTML, and you can do more by yourself by using Spire.XLS for .NET.

Convert Excel to HTML with C#

[C#]

using Spire.Xls;

namespace Xls2Html

{

class Program

{

static voidMain(string[] args)

{

Workbook workbook = new Workbook();

workbook.LoadFromFile("Sample.xls";

Worksheet sheet = workbook.Worksheets[0];

sheet.SaveToHtml("sample.html";

}

}

}

Convert excel to html is very easy. A lot of online Excel to HTML converter can do that job. But, if you want to have a hundreds batch conversion, or want to convert after edit, set format and so on, that online converter can not help you. But through Spire.XLS, a .NET excel library, you can easily do the jobs mentioned above and more others. Now use the code below, you can easily convert Excel to HTML, and you can do more by yourself by using Spire.XLS for .NET.

Convert Excel to HTML with C#

[C#]

using Spire.Xls;

namespace Xls2Html

{

class Program

{

static voidMain(string[] args)

{

Workbook workbook = new Workbook();

workbook.LoadFromFile("Sample.xls";

Worksheet sheet = workbook.Worksheets[0];

sheet.SaveToHtml("sample.html";

}

}

}

Reply to this topic

Message
Reply
Follow us on twitter Subscribe to our RSS feed
Activate your free membership today | Login | Currency