The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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: sht.Range["45:55"].Clear(ExcelMoveDirection.MoveUp);
but it took "System.ArgumentException was unhandled by user code" Message="Wrong range name format - alpha part "
CPChella Pandian B Syncfusion Team 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.
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.
CPChella Pandian B Syncfusion Team 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++) { sheet.DeleteRow(45); }