- Demo
- C# source
- VB.Net source
The sample demonstrates how to convert Excel workbook to HTML file via Spire.XLS.
using Spire.Xls; namespace ToHtml { class Program { static void Main(string[] args) { Workbook workbook = new Workbook(); workbook.LoadFromFile(@"..\..\..\..\Data\vendors.xls",ExcelVersion.Version97to2003); Worksheet sheet = workbook.Worksheets[0]; sheet.SaveToHtml("sample.html"); System.Diagnostics.Process.Start("sample.html"); } } }
Imports Spire.Xls Namespace ToHtml Friend Class Program Shared Sub Main(ByVal args() As String) Dim workbook As New Workbook() workbook.LoadFromFile("..\..\..\..\Data\vendors.xls",ExcelVersion.Version97to2003) Dim sheet As Worksheet = workbook.Worksheets(0) sheet.SaveToHtml("sample.html") System.Diagnostics.Process.Start("sample.html") End Sub End Class End Namespace