GroupDocsGists
10/19/2017 - 10:58 AM

RenderExcelAsHtmlIgnoringEmptyRows.cs

// For complete examples and data files, please go to https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-.NET
ViewerConfig config = Utilities.GetConfigurations();

// Create html handler
ViewerHtmlHandler htmlHandler = new ViewerHtmlHandler(config);
string guid = DocumentName;

// Set Cells options to hide overflowing text
HtmlOptions options = new HtmlOptions();
options.CellsOptions.IgnoreEmptyRows = true; // default value is false

// Get pages
List<PageHtml> pages = htmlHandler.GetPages(guid, options);

foreach (PageHtml page in pages)
{
    //Save each page at disk
    Utilities.SaveAsHtml(page.PageNumber + "_" + DocumentName, page.HtmlContent);
}