Excel/AS -- How to determine if row is hidden?

I’m currently converting an Excel 2004 spreadsheet from using a VBA macro to AppleScript (in anticipation of converting to Excel 2008). The spreadsheet is updated every week with payroll information. As people come and go, or switch between one department and another, rows are hidden or unhidden accordingly. I’d like to be able to determine if a row is hidden, and skip it if true. The VBA macro does not check for hidden rows, so I try to be sure that all amounts are zeroed when hiding the row so that nothing gets added by mistake when the macro adds up the values in the columns. But I may not always be the one updating the spreadsheet, and it could be an easy step to skip if you’re in a hurry. I see the hidden property for range, but I can’t seem to get the AppleScript syntax right to set a range to the entire row, much less return the Boolean value for hidden. Any suggestions?

Hi,

this example tells you every hidden row


tell application "Microsoft Excel"
	set R to count rows of used range of active sheet
	repeat with oneRow from 1 to R
		if hidden of row oneRow of used range of active sheet then say "row " & oneRow & " is hidden"
	end repeat
end tell

Thank you, thank you, thank you! I figured it had to be fairly simple, but didn’t think it was THAT simple. Still a lot to learn about AppleScript, so I appreciate having this forum of knowledgeable people available who are willing to share their experience.