SpreadsheetGear Namespace > IRange Interface : AutoFit Method |
'Declaration
Sub AutoFit()
'Usage
Dim instance As IRange instance.AutoFit()
void AutoFit()
procedure AutoFit();
function AutoFit();
void AutoFit();
void AutoFit();
// Automatically set the width on columns B and C. worksheet.Cells["B:C"].Columns.AutoFit(); // Set the row height to automatic on rows 7 through 9. worksheet.Cells["7:9"].Rows.AutoFit();
' Automatically set the width on columns B and C. worksheet.Cells("B:C").Columns.AutoFit() ' Set the row height to automatic on rows 7 through 9. worksheet.Cells("7:9").Rows.AutoFit()
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2