I want to check if a range (cells in row * column) is empty using C#. I can traverse through cells, but any bettter and faster way ? Any method to get range from selected/active cell and number of rows and column ?
I suppose that Excel.WorksheetFunction.CountA works not only with sheets but with any Range argument:
Use CountA to count the number of cells that contain data in a range
A value is any type of information, including error values and empty
text (“”). A value does not include empty cells.
If an argument is an array or reference, only values in that array or
reference are used. Empty cells and text values in the array or
reference are ignored.