How to delete Row[i]?

I want to delete a row which I choosed according my arithmetic, I used the command: excel.Worksheets[“Sheet1”].Cells.Rows.RemoveAt(3);
but it did not work, I wonder is there any effective method to do this?
Thank you!

I also used: excel.Worksheets[“Sheet1”].Cells.DeleteRow(3);
it still did not work!

Please use

excel.Worksheets[“Sheet1”].Cells.DeleteRow(3);

It deletes row at 4. Row index parameter in DeleteRow method is zero based.

it didnot change anything!
My codeline is:
Excel excel=new Excel();
excel.Open(“E:\xue.xls”);
excel.Worksheets[“Sheet1”].Cells.DeleteRow(0);

Could you email me your file?

@leonidxue,
Aspose.Cells has replaced Aspose.Excel which is no more under development and discontinued. You may try Aspose.Cells which is much more efficient and feature rich as compared to its predecessor. This new product not only supports all the features in Aspose.Excel but also contains support for the latest features in different versions of MS Excel. This new product supports adding and removing rows and columns in a variety of combinations using different options. Try the following examples to test this feature using this new product.

Delete row

// Creating a file stream containing the Excel file to be opened
FileStream fstream = new FileStream(dataDir + "Book1.xlsx", FileMode.OpenOrCreate);

// Instantiating a Workbook object
// Opening the Excel file through the file stream
Workbook workbook = new Workbook(fstream);

// Accessing the first worksheet in the Excel file
Worksheet worksheet = workbook.Worksheets[0];

// Deleting 10 rows from the worksheet starting from 3rd row
worksheet.Cells.DeleteRows(2, 10);

// Saving the modified Excel file
workbook.Save(dataDir + "output.xlsx");

// Closing the file stream to free all resources
fstream.Close();

Delete column

// Creating a file stream containing the Excel file to be opened
FileStream fstream = new FileStream(dataDir + "Book1.xlsx", FileMode.Open);

// Instantiating a Workbook object
// Opening the Excel file through the file stream
Workbook workbook = new Workbook(fstream);

// Accessing the first worksheet in the Excel file
Worksheet worksheet = workbook.Worksheets[0];

// Deleting a column from the worksheet at 5th position
worksheet.Cells.DeleteColumn(4);

// Saving the modified Excel file
workbook.Save(dataDir + "output.xlsx");

// Closing the file stream to free all resources
fstream.Close();

Here is a link to a document containing multiple examples to demonstrate this feature:
Inserting and Deleting Rows and Columns

Following link can be used to download the latest free version of this product for trial purpose:
Aspose.Cells for .NET(Latest version)

A rich ready to run solution is available here that can be used to test variety of features in this product.