Unable to set the Hidden property of the Range class c# excel interop
<p>I am trying to set Hide=false on an Excel Range object and I keep getting the "Unable to set the Hidden property of the Range class" Exception.  My sheet is not protected and I have no merged cells in the range.  </p>

<p>I am doing it like this:</p>

<pre><code>    reportSheet.Unprotect("foo");
    int maxUsedRow = reportSheet.UsedRange.Rows.Count;
    int maxUsedColumn = reportSheet.UsedRange.Columns.Count;
    reportSheet.Cells.Range["A5", reportSheet.Cells[maxUsedRow, maxUsedColumn]].Hidden = false;
</code></pre>

<p>Interestingly:
1. Never anywhere in the code, am I explicitly setting the Hidden property to true, and yet that is what results after the programmatic manipulation.
2. I do not get this error if I do the following, but it also does not work.</p>

<pre><code>    int rowNum = 5;
    reportSheet.Rows[rowNum].Hidden = false;
</code></pre>

<p>Any ideas?</p>

<hr>

<p>I was trying to recreate this behavior in a new project and I realized something in the existing code must have been setting the hidden property.  I debugged through it and found out it was the FormulaHidden property.  Could this be overriding the Hidden property and preventing it from being reset programmatically because it superceeds Hidden?</p>