Set-SLAutoFitRow


Synopsis

Autofit rows by RowIndex.

Syntax

Description

Autofit columns by RowIndex.A single row or a range of rows can be specified as input.

Parameters

-WorkBookInstance

Instance of an excel document that can be used for editing.

Required? True
Position? 0
Default value  
Accept pipeline input? true (ByValue)
Accept wildcard characters? False

-WorksheetName

Name of the Worksheet that is to be processed.

Required? False
Position? 1
Default value  
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? False

-MaximumRowHeight

Specifies the maximum row height for a row or a range of rows after autofit is applied. Eg: 10.

Required? False
Position? named
Default value  
Accept pipeline input? false
Accept wildcard characters? False

-RowIndex

The row to be autofit. Eg: 2 or 5.

Required? True
Position? 2
Default value  
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? False

-StartRowIndex

Specifies the start of the autofit row range. Eg: 2.

Required? True
Position? named
Default value  
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? False

-ENDRowIndex

Specifies the end of the autofit row range. Eg: 5.

Required? True
Position? named
Default value  
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? False

This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

Inputs

String,Int,SpreadsheetLight.SLDocument

Outputs

SpreadsheetLight.SLDocument

Notes

Examples

Example 1

Autofit row 3.

Example 2

Autofit rows 4 to 6 by index.

Example 3

Autofit rows 4 to 6 by index and optionally set a MaximumRowHeight of 20.

Related links