Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3954154
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T02:03:44+00:00 2026-05-20T02:03:44+00:00

I have a C# add-in for Excel and I need to put the data

  • 0

I have a C# add-in for Excel and I need to put the data on a worksheet. I do it like so:

// 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;

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.

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T02:03:44+00:00Added an answer on May 20, 2026 at 2:03 am

    worksheet.Rows.Count will give you the maximum number of rows in a given worksheet. If you check this property before accessing a large number of rows you can make your program compatible with 2003, 2007, and take advantage of increased numbers of rows in all future versions of Excel.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've created an excel sheet with Delphi 6. Now I have to add a
I have a excel i need to add some more sheets into the excel
I need to manuplate an excel sheet workbook (add sheets/ add data/ hide columns
I have Excel add-in which I add so many class modules that it is
I have created an Excel 2003 add-in that uses the CLR 2.0 and this
I have written a few Excel 2003/2007 add-ins using VSTO, and I usually end
I have a Excel addin that displays some structures on the worksheet. Users can
I often times have the need to import 3D points (x,y,z data) into the
We have an Excel file with a worksheet containing people records. 1. Phone Number
I have an Excel 2003 add-in deployed in one of our departments that occasionally

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.