We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Deleting a range of rows

Thread ID:





51876 Nov 15,2006 08:27 PM UTC Nov 16,2006 03:53 PM UTC ASP.NET Web Forms (Classic) 3
Tags: XlsIO
Asked On November 15, 2006 08:27 PM UTC

I'm trying to write a line of code that will accomplish doing a select on Rows 45 through 55, then Delete the rows and let the rows below shift up. I want to delete the entire Row, not just selected columns.

I tried this:

but it took "System.ArgumentException was unhandled by user code"
Message="Wrong range name format - alpha part "

Any ideas? TIA

Chella Pandian B [Syncfusion]
Replied On November 15, 2006 09:42 PM UTC

Hi Chuck

I think this must help you.

// Where 45 is the first row. 1 is the column of 45 row. 55 is the last row and 10 is the last column in 55th row. It mean I have 10 columns in my excel sheet.


Let me know if you have any other queries.

With regards,

Replied On November 16, 2006 02:22 PM UTC

Thank you for assistance. That method does give me a way to select and clear a range of cells.

Unfortunately deleting a range of cells is not the same a deleting a range of rows. For one thing, it leaves the spreadsheet with the same last used row as before the clear operation, where deleting rows changes the last used row.

Is there a way of deleting either 1 or many entire rows? That is, without specifying columns too?

TIA again.

Chella Pandian B [Syncfusion]
Replied On November 16, 2006 03:53 PM UTC

Hi Chuck

I have found you another solution.

// This will delete 10 rows from 45th row
for(int i=1;i<=10;i++)

I have even attached a sample too.



With Regards,


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon