Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

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

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: 154
Joined: Thu Oct 20, 2011 2:53 am

Return to Spire.XLS

cron