Exporting from Aspose.Excel to HTML

Sir,

Looking back through the forums I came across a post from mid-2004 about exporting an Excel worksheet to HTML. The post can be found at https://forum.aspose.com/t/118392

In that post it was mentioned that this capability would be available in late 2004.

I’ve recently downloaded the trial version of Aspose.Excel to look at using in a web-based document management system we are developing, but I can’t find any way to actually export to HTML.

Was this feature actually developed in the end and if so, how would I use it?

Regards,

Andrew Dancy
Lovetts plc

Hi Andrew,

We did think about to convert spreadsheet to HTML before. But we postpone this feature for two reasons:

1. This feature is really complex to implement.
2. Our team members focus on a new product : Aspose.Cells for .NET (Latest Version).

We still plan to add spreadsheet to HTML feature in the future release, but I cannot give you a detail plan now. Please try to see if Aspose.Excel.Web can serve your need.

Thanks for that. I'll have a look at the Excel.Web control and see if it will suit our needs.

Regards,

Andrew Dancy
Lovetts plc

@adancy,
Aspose.Excel is discontinued and is replaced by an advanced product Aspose.Cells. This new product contains all the latest features to export Excel workbook to HTML as well as import HTML to Excel workbook. A rich set of APIs is available for working with HTML like exporting Excel to HTML with headings, exclude unused styles during Excel to HTML conversion, Export Comments while Saving Excel file to HTML, Export only print area range to HTML and many more.

Here is a simple example that exports print area to HTML.

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
// Load the Excel file.
Workbook wb = new Workbook(sourceDir + "sampleInlineCharts.xlsx");

// Access the sheet
Worksheet ws = wb.Worksheets[0];

// Set the print area.
ws.PageSetup.PrintArea = "D2:M20";

// Initialize HtmlSaveOptions
HtmlSaveOptions options = new HtmlSaveOptions();

// Set flag to export print area only
options.ExportPrintAreaOnly = true;

//Save to HTML format
wb.Save(outputDir + "outputInlineCharts.html", options);

For detailed information about working with HTML features in Aspose.Cells, refer to the following document section.
HTML

The free trial version of this new product can be downloaded from the following link:
Aspose.Cells for .NET (Latest Version)

A comprehensive runnable solution can be downloaded here to test the features of this new product.