newSheet.Range[1,1000].RowHeight = 12; // NEED TO SET ALL ROWS HEIGHT TO 12 FOR THIS SHEET, right now hardcoded row range 1 to 1000 .... Correct????

I have added some styles and some information to cells.

This works fine. Till row 10 I have the mandatory information needed when I create sheet. i have some controls in ribbon to do some user action.

Now I want to find the Row from where I can start writing information to cells, like in first case it would be row 11. But when user has already done performed some action and data is written from row 11 to row 20 (assume in first case I hardcoded row 11).

Now how do I find the row 21 to start writing when user action is done.

I have used int countRows = newSheet.UsedRange.EntireRow.Count; but this gives
1000 as I had edited row height till 1000.

Any idea on how to get the row from where to start writing. May be getting last row where some thing is written in some cell. Any help would be appreciated as I am new to VSTO development.

Answers

Although you're using a VSTO Workbook, the question your have is more about how the Excel object model works. VSTO builds on the Excel object model and, for the most part, that's what your code works with. In this case, it is definitely the Excel object
model. The people who know best how to work with the Excel object model congregate in the Excel for Developers forum. You might have better luck asking the question "How do I locate the first empty cell" there, than here...

Although you're using a VSTO Workbook, the question your have is more about how the Excel object model works. VSTO builds on the Excel object model and, for the most part, that's what your code works with. In this case, it is definitely the Excel object
model. The people who know best how to work with the Excel object model congregate in the Excel for Developers forum. You might have better luck asking the question "How do I locate the first empty cell" there, than here...

By selecting Column we cannot set row height for all rows. To see, open excel sheet and just select some columns and change row height, it will change only for that row. To set RowHeight for all Rows we need to select all Rows in Excel, i.e. do Ctrl A then
adjust row height, it sets for all rows.