'Find row limit in the excel worksheet using c#

I have 12,00,000 records and have to generate an excel file. while generating I found the excel sheet was allow only 10,00,000+ records. while adding these records I am getting the exception. to avoid that I found one solution if we found rows limit of excel sheet which allow the no. of rows. by comparing we can add the limit raged data.

Now, my main problem was how to find the row limit of the excel sheet programmatically ?. please help with this one.

Thank You.



Solution 1:[1]

After a long effort on finding how many rows the excel sheet will support for each sheet. I found one line of code which was returns the row limit of excel sheet.

workSheet.Cells.Rows

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Naveen V