title: How can I get the maximum size I can resize an Excel worksheet?
body: <p>I have a C# add-in for Excel and I need to put the data on a worksheet.  I do it like so:</p>
  
  <pre><code>// Now build a string array of the results
  string[,] resultArray = new string[objects.Length, length];
  
  // Fill in the values
  Excel.Range resultRange = worksheet.get_Range("A2").get_Resize(objects.Length, length);
  resultRange.Value = resultArray;
  </code></pre>
  
  <p>I have left out some unimportant steps.  Basically, I am passed an array of objects, I get the type from the first one and use the properties to build a list of column names.  I put that in the row 1.  That is why I start the data in row 2.</p>
  
  <p>The issue I ran across is that I had an Excel 97-2003 workbook (with max rows of around 65K row) and I tried to bring in 105K objects.  It choked on the resize.  I would like to check to see if my resize is even valid so I can tell the user, but I can't seem to find a "MaxRows" or similar property. Is there one?</p>