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

Free Support Forum - aspose.com

Read write and render MHTML file format in .NET

I have Excel oriented HTML file (.mht format file generated through excel). It had multiple sheets. When I try to load it in workbook I get “This is not a structured storage file.” error message. I can open the same file in Excel without any issues. Could anybody load html file successfully?


You can only load HTML file not MHT files. Please see the following code, it loads html file and converts it to xls file.

I have attached the source and output files.

Please use the latest version:
Aspose.Cells for .NET v7.0.3.3


string path = @“C:\Documents and Settings\Home\Desktop\Source And Output Files\Book1.htm”;

Workbook workbook = new Workbook(path);

workbook.Save(path + “.out.xls”);


Aspose.Cells now supports reading and writing MHTML file format. We recommend to use latest version here:
See the sample code for your reference:
Sample code:

 var workbook = new Workbook("e:\\test2\\myfile1.mht", new LoadOptions(LoadFormat.MHtml));

See the up-to-date Docs for your complete reference:

You may download the featured Examples @ Github repos. here.