Render hidden columns and rows
This article explains how to show hidden rows and cells when viewing Spreadsheets with GroupDocs.Viewer within your Java applications.
Background
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 setRenderHiddenRows(…) and setRenderHiddenColumns(…) options in SpreadsheetOptions class which enables rendering hidden rows and columns as shown in the following code samples.
try (Viewer viewer = new Viewer("sample.xlsx")) {
HtmlViewOptions viewOptions = HtmlViewOptions.forEmbeddedResources();
viewOptions.getSpreadsheetOptions().setRenderHiddenColumns(true);
viewOptions.getSpreadsheetOptions().setRenderHiddenRows(true);
viewer.view(viewOptions);
}
More resources
GitHub Examples
You may easily run the code above and see the feature in action in our GitHub examples:
- GroupDocs.Viewer for Java examples, plugins, and showcase
- Document Viewer for .NET App WebForms UI Modern Example
- Document Viewer for Java App Dropwizard UI Modern Example
- Document Viewer for Java Spring UI Example
- GroupDocs.Viewer for .NET samples, plugins and showcase
- Document Viewer for .NET MVC UI Example
Free Online App
Along with full-featured Java library we provide simple but powerful free Apps. You are welcome to view Word, PDF, Excel, PowerPoint documents with free to use online GroupDocs Viewer App.