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

Free Support Forum - aspose.com

Empty html output from ASPOSE.Cells


I'm using ASPOSE.Cells with temp license, when I want to to save generated excel file into html code/html file by

_workbook.Save("c:\\_out.html", FileFormatType.Html);

I don't able to see any generated data, only empty HTML page is displayed. In generated html file aren't present any excel data.

Please advice, where is a problem,


I attached html + xls files.


Hi Peter,

I don't find the problem, you have mentioned. I tested using your .xls file and the .html file generated is fine with data when I opened the file into MS Excel. Which version of Aspose.Cells for .NET you are using. Kindly try the latest version 4.5. or try the fix attached in the thread: <A title="https://forum.aspose.com/t/88644 CTRL + Click to follow link" href="https://forum.aspose.com/t/88644</FONT></A> </P> <P>Thank you.</P>


I'm using evaluation version with temp license.

I see in my first post that the attached file is .xls file only... Later I will upload original .html file generated by this command (now I'm at home):

_workbook.Save("c:\\_out.html", FileFormatType.Html);

you will able to see the html content.

I don't understand what happened but as I mentioned already the html file doesn't contain any excel data. I've tried to do with 2 different spreadsheets, but every html file contains only html tags without data.




I tested your xls file and didn’t find the problem you have mentioned.

Please try the attached version. If you still find the problem, please post your output file and sample codes here.

Thank you.

I discovered, where is a problem, these lines are not working (I attached generated empty html file):

_excel.Save("c:\\_out.xls"); // this line is generates xls file with data

_excel.Save("c:\\_out.html", FileFormatType.Html); // empty html with 8274 bytes filesize

_excel.Save("c:\\_out.pdf", FileFormatType.AsposePdf); // empty pdf with 90 bytes

_excel.Save("c:\\_out.xml", FileFormatType.SpreadsheetML); // empty xml with 1120 bytes

but when I try to do:


_excel.Save("c:\\_out.html", FileFormatType.Html); // I see functional xls file with data

//_excel.Save("c:\\_out.pdf", FileFormatType.AsposePdf);

//_excel.Save("c:\\_out.xml", FileFormatType.SpreadsheetML);


After calling Workbook.Save() method, data in Workbook instance will be reset. If you need to save the workbook to other file format, you have to open it again.

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Please try the following code:

string infn = @"E:\ TestCases\empty_html_out.xls";

string outfn1 = @"E:\ TestCases\empty_html_out_out.xls";

string outfn2 = @"E:\ TestCases\empty_html_out_out.html";

Workbook book = new Workbook();



book = new Workbook();


book.Save(outfn2, FileFormatType.Html);

Thank you.

OK, thanks… Please see on my another problem with NullReferenceException.