For example to check if row 5 is visible use formula subtotal(2; A5:A5) - that will return 1 if row is visible, and 0 if it is not. It should work in Excel as well.
Make cell's content formula (ie "=blah blah blah"); when you get value you need copy it to clipboard, then choose paste special instead of normal paste and uncheck pasting formulas.