So I'm having a problem finding the number of rows in an excel document that has data in it. Here's what I have so far:
        for (int i = 2; i <= b; i++)
        {
            if (!(worksheet.get_Range("A" + i, misValue).Formula == null))
            {
                a.Add(worksheet.get_Range("A" + i, misValue).Formula);
            }
        }
At the moment I'm just crudely shuffling through a large number of lines, questioning whether it's null or not, then adding the contents to a list. There has to be an easier way that google has yet to show me. Thanks for the help in advanced
 
    