Q:

Exclude one row from range

I am working on a WPF project which makes an excel. In the excel sheet, I select a range, something like:
Range c1 = newSheet.Cells[3, 2];
Range c2 = newSheet.Cells[8, 10];
Range rng = (Range)newSheet.get_Range(c1, c2);

and I need to remove, lets say,  line 5 from this range.
How do I exclude a line from a range, based on its index in the excel sheet?

A:

You can get non-contiguous ranges via the Range() method.  
In this case, 3, 2 is B3 and 8, 10 is J8.  To get a non-contiguous range excluding row 5:
Range rng = newSheet.Range("B3:J4,B6:J8")

The only way I can see to do this using cell row/col refs is to select each contiguous range via these and concatenate the resulting addresses, for example:
var top = sheet.Range(sheet.Cells[3, 2], sheet.Cells[4, 10]);
var bottom = sheet.Range(sheet.Cells[6, 2], sheet.Cells[8, 10]);
var all = sheet.Range(top.Address + "," + bottom.Address);

