How can I hide selected rows (one or more) of a worksheet?
Please check http://www.aspose.com/Products/Aspose.Excel/Api/Aspose.Excel.Cells.HideRow.html
.
@romanr,
Aspose.Cells that has replaced Aspose.Excel contains multiple features to show/hide rows and columns. The cells collection in worksheet contains functions to perform these tasks. Here is an example that can be referred to hide multiple rows and columns.
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
// Creating a file stream containing the Excel file to be opened
FileStream fstream = new FileStream(dataDir + "book1.xls", FileMode.Open);
// Instantiating a Workbook object
// Opening the Excel file through the file stream
Workbook workbook = new Workbook(fstream);
// Accessing the first worksheet in the Excel file
Worksheet worksheet = workbook.Worksheets[0];
// Hiding 3,4 and 5 rows in the worksheet
worksheet.Cells.HideRows(2, 3);
// Hiding 2 and 3 columns in the worksheet
worksheet.Cells.HideColumns(1, 2);
// Saving the modified Excel file
workbook.Save(dataDir + "outputxls");
// Closing the file stream to free all resources
fstream.Close();
Have a look at the following document for more information to hide/show rows and columns.
Hiding and Showing Rows and Columns
You may download the latest free trial version to test this product here:
Aspose.Cells for .NET (Latest Version)
A runnable solution can be downloaded here for testing the variety of features with minimal effort.