Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programmatically alter an Excel sheet's row height

Tags:

c#

excel

vsto

How can I alter the row heights of all my non empty rows in my EXCEL sheet? Thanks in advance, w.

like image 296
Walid Avatar asked Feb 14 '11 10:02

Walid


People also ask

How do you dynamically adjust row height in Excel?

Select the row or rows that you want to change. On the Home tab, in the Cells group, click Format. Under Cell Size, click AutoFit Row Height. Tip: To quickly autofit all rows on the worksheet, click the Select All button, and then double-click the boundary below one of the row headings.


1 Answers

Try this

sampleRange.Resize.RowHeight=x; //x's type must int

like image 154
Dursun Çimen Avatar answered Sep 21 '22 16:09

Dursun Çimen