I have a really large excel file and i need to delete about 20,000 rows, contingent on meeting a simple condition and excel won\'t let me delete such a complex range when us
You can use,
sh.Range(sh.Cells(1,1),sh.Cells(20000,1)).EntireRow.Delete()
will delete rows 1 to 20,000 in an open Excel spreadsheet so,
if sh.Cells(1,1).Value == 'X': sh.Cells(1,1).EntireRow.Delete()