I want to add a empty row in worksheet.
Thanks for using Aspose APIs.
Please use Worksheet.Cells.InsertRows() method for your needs. Please see the following sample code, its comments, input and output Excel files and screenshot for a reference.
The code inserts 10 empty rows starting from 3rd row.
Input and Output Excel files.zip (12.9 KB)
// Load a template file. Workbook workbook = new Workbook("sampleInsertRows.xlsx"); // Get the first worksheet in the book. Worksheet sheet = workbook.Worksheets; // Insert 10 rows at row index 2 (insertion starts at 3rd row) sheet.Cells.InsertRows(2, 10); // Save the excel file. workbook.Save("outputInsertRows.xlsx");