XLS To HTML

Technical support for Spire.XLS

Moderators: iceblue support, Flash, Manager

XLS To HTML

Postby atulp » Mon Mar 05, 2012 11:05 am

How Can we convert XLS into HTML?

If it have images then what i haveto do the same?
atulp
 
Posts: 2
Joined: Mon Mar 05, 2012 6:59 am

Re: XLS To HTML

Postby Suvi.Wu » Tue Mar 06, 2012 2:35 am

Hi atulp,

Thanks for evaluating Spire.XLS.

Spire.XLS just support to convert one worksheet to a html instead of whole workbook. You just need use the method " sheet.SaveToHtml(@"..\..\result.html")" to convert XLS to html no matter whether image in the file. I also attched you the whole code:
Code: Select all
using Spire.Xls;

namespace _384ExcelImagesToHTML
{
    class Program
    {
        static void Main(string[] args)
        {
            //load the workbook
            Workbook workbook = new Workbook();
            workbook.LoadFromFile(@"..\..\data.xls", ExcelVersion.Version97to2003);

            //get the worksheet you want to convert to html
            Worksheet sheet = workbook.Worksheets[0];
           
            //convert the worksheet to html
            sheet.SaveToHtml(@"..\..\result.html");

            //launch the html
            System.Diagnostics.Process.Start(@"..\..\result.html");
        }
    }
}

hoping this can be helpful for you.

If you still have any questions,please feel free to contact us.

Have a nice day.

Kind Regards.
Suvi
e-iceblue support
User avatar
Suvi.Wu
 
Posts: 156
Joined: Thu Oct 20, 2011 2:53 am


Return to Spire.XLS

Who is online

Users browsing this forum: No registered users and 0 guests