Created
December 23, 2020 08:34
-
-
Save sohail-aspose/e0b5fa34b542212ea63edcd83630464b to your computer and use it in GitHub Desktop.
Delete Blank Rows from all Worksheets in an Excel file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Open an existing excel file. | |
Workbook workbook = new Workbook("SampleInput.xlsx"); | |
// Iterate over the worksheets. | |
foreach (Worksheet sheet in workbook.Worksheets) | |
{ | |
// Delete the Blank Rows from the worksheet. | |
sheet.Cells.DeleteBlankRows(); | |
} | |
// Save the excel file. | |
workbook.Save("SampleOutput.xlsx"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment