BenSelect Documentation
AutofitRow Method
See Also  Send Feedback
ETI.Report Namespace > ExcelHelper Class : AutofitRow Method
row1
First row to autofit.
row2
Last row to autofit.
autofitNotAutofittingRows
When you are autofitting a range of rows, some rows might not be set to Autofit in Excel. When this parameter is true, those rows will be autofitted anyway.
keepHeightAutomatic
If true, rows will be still autoheight when you open the file in Excel, so Excel will recalculate the values, probably changing the page breaks. If you set it to false, rows will be fixed in size, and when you open it on Excel they will remain so.
adjustment
You will normally want to set this parameter to 1, which means that autofit will be made with standard measurements. If you set it to for example 1.1, then rows will be adjusted to 110% percent of what their calculated height was. Use this parameter to fine-tune autofiting, if for example rows are too small when opening the file in Excel.
Autofits a range of rows so they adapt their height to show all the text inside. Note that due to GDI+ / GDI incompatibilities, the height calculated by FlexCel will not be exactly the same than the one calculated by Excel. So when you open this workbook in Excel, Excel will re calculate the row heights to what it believes is best. You can change this behavior specifying keepHeightAutomatic = false.

Syntax

JScript 
public function AutofitRow( 
   row1 : int,
   row2 : int,
   autofitNotAutofittingRows : boolean,
   keepHeightAutomatic : boolean,
   adjustment : double
);

Parameters

row1
First row to autofit.
row2
Last row to autofit.
autofitNotAutofittingRows
When you are autofitting a range of rows, some rows might not be set to Autofit in Excel. When this parameter is true, those rows will be autofitted anyway.
keepHeightAutomatic
If true, rows will be still autoheight when you open the file in Excel, so Excel will recalculate the values, probably changing the page breaks. If you set it to false, rows will be fixed in size, and when you open it on Excel they will remain so.
adjustment
You will normally want to set this parameter to 1, which means that autofit will be made with standard measurements. If you set it to for example 1.1, then rows will be adjusted to 110% percent of what their calculated height was. Use this parameter to fine-tune autofiting, if for example rows are too small when opening the file in Excel.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2024 All Rights Reserved.