I have the following code:
Excel.Range range = workSheet.UsedRange;
for (rowCount = 2; rowCount <= range.Rows.Count; rowCount++)
{
//Do something here
}
However, I encounter the following problem. If I have the following excel data:
cell1, cell2, cell3
cell4, cell5, cell6
..............cell7
range.Rows.Count will return 3. However, I don't care about column C - it has some data that is used for drop-down lists within say column 1. How can I get the range.Rows.Count only for columns A and B?
For example:
