Quantcast
Channel: CSharp Forum Latest Questions
Viewing all articles
Browse latest Browse all 32062

Check if Cells A2 and A3 are blank in Excel

$
0
0
I tried this code:

public static void CellsBlank()
{
Worksheet worksheet;
Workbook wb = Global.Variables.GlobalVariables.oXL.ActiveWorkbook;
Excel.Range cell1 = (Excel.Range)worksheet.get_Range("A2", "A2");
Excel.Range cell2 = (Excel.Range)worksheet.get_Range("A3", "A3");
}

But that throws a debug error when it hits my Excel.Range cell1 line!  How should I re-write this?

Viewing all articles
Browse latest Browse all 32062

Trending Articles