from aspose.cells import Workbook

#  For complete examples and data files, please go to https:# github.com/aspose-cells/Aspose.Cells-for-.NET
#  The path to the documents directory.
dataDir = RunExamples.GetDataDir(".")
#  Creating a file stream containing the Excel file to be opened
fstream = open(dataDir + "book1.xls", "rb")
#  Instantiating a Workbook object
#  Opening the Excel file through the file stream
workbook = Workbook(fstream)
#  Accessing the first worksheet in the Excel file
worksheet = workbook.worksheets[0]
#  Inserting 10 rows into the worksheet starting from 3rd row
worksheet.cells.insert_rows(2, 10)
#  Saving the modified Excel file
workbook.save(dataDir + "output.out.xls")
#  Closing the file stream to free all resources
fstream.close()