Xceed Workbooks for .NET v1.4 Documentation
AutoFit Method (Row)
Example 


Xceed.Workbooks.NET Assembly > Xceed.Workbooks.NET Namespace > Row Class : AutoFit Method
Adjusts the Height based on the highest Cell in the Row
Overload List
OverloadDescription
Identifies the start and end of the AutoFit's range by using Ids.  
Identifies the start and end of the AutoFit's range by using string Ids.  
Example
using( var workbook = Workbook.Create( "test.xlsx" ) )



  {

    // Get the first worksheet. A workbook contains at least 1 worksheet.

    var worksheet = workbook.Worksheets[ 0 ];



    worksheet.Cells[ "D6" ].Value = "This row has an autoFit.";

    worksheet.Rows[ "D" ].AutoFit();



    // Save workbook to disk.

    workbook.Save();

  }
Requirements

Target Platforms: Windows 11, Windows 10, 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

See Also

Reference

Row Class
Row Members
Base Implementation in AutoFit