We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose conversion for .xls to HTML behaves differently on Mac and Linux

As a part of my application I have to convert excel spreadsheets to HTML files. The Aspose cells library is behaving differently on Mac and Linux, even though I am using JDK1.8 on both.


For mac the HTML converted file contain Sheets and looks more like an Excel document.
But on Linux it pretty much the plain text formatted in a table.

I have attached the sample Excel file I used along with converted outputs on both Mac and Linux.

How can I get it behave same in both environments?
Hi,

Thanks for your posting and using Aspose.Cells.

This issue occurs when you do not set license of Aspose.Cells. When Aspose.Cells works in Evaluation Mode (means you do not set its license), then Aspose.Cells creates an extra sheet with warning that is called Evaluation Warning Worksheet. Evaluation Warning worksheet is always set as an active worksheet, because of that you get an extra worksheet.

You can test this issue by commenting and un-commenting the following line of code and you will get different results.

Summary
With license set, you will get one html page.
With license not set, you will get two worksheets html pages.

Java
//This is path of your license file
String licPath = "F:/Download/Aspose.Total.Java.lic";

com.aspose.cells.License lic = new com.aspose.cells.License();
//lic.setLicense(licPath); //comment or uncomment this line

Workbook wb = new Workbook(dirPath + "excel_test.xls");
wb.save(dirPath + "o2.html");