Delete Blank Rows from all Worksheets in an Excel file.
// 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