Render hidden columns and rows

Sometimes Excel document may contain hidden columns and rows (as shown in the image below). GroupDocs.Viewer doesn’t render hidden columns and rows by default. However, there may be the case when you want to control the inclusion of hidden content in the rendering results.

The Solution

GroupDocs.Viewer provides RenderHiddenRows and RenderHiddenColumnsoptions in SpreadsheetOptions class which enables rendering hidden rows and columns as shown in the following code samples.

using (Viewer viewer = new Viewer("sample.xlsx"))
{
    HtmlViewOptions viewOptions = HtmlViewOptions.ForEmbeddedResources();
    viewOptions.SpreadsheetOptions.RenderHiddenColumns = true;
    viewOptions.SpreadsheetOptions.RenderHiddenRows = true;
    viewer.View(viewOptions);
}

© Aspose Pty Ltd 2001-2022. All Rights Reserved.