Supprimer les lignes et colonnes vides dans une feuille de calcul

Code C# pour supprimer les lignes vides

from aspose.cells import Workbook
# The path to the documents directory.
dataDir = "./"
# Open an existing excel file.
wb = Workbook(dataDir + "SampleInput.xlsx")
# Create a Worksheets object with reference to
# The sheets of the Workbook.
sheets = wb.worksheets
# Get first Worksheet from WorksheetCollection
sheet = sheets[0]
# Delete the Blank Rows from the worksheet
sheet.cells.delete_blank_rows()
# Save the excel file.
wb.save(dataDir + "mybook.out.xlsx")

Code C# pour supprimer les colonnes vides

from aspose.cells import Workbook
# The path to the documents directory.
dataDir = "./"
# Open an existing excel file.
wb = Workbook(dataDir + "SampleInput.xlsx")
# Create a Worksheets object with reference to
# The sheets of the Workbook.
sheets = wb.worksheets
# Get first Worksheet from WorksheetCollection
sheet = sheets[0]
# Delete the Blank Columns from the worksheet
sheet.cells.delete_blank_columns()
# Save the excel file.
wb.save(dataDir + "mybook.out.xlsx")