Skip to content

Latest commit

 

History

History
180 lines (141 loc) · 3.53 KB

File metadata and controls

180 lines (141 loc) · 3.53 KB
external help file PSWriteOffice-help.xml
Module Name PSWriteOffice
online version https://github.com/EvotecIT/PSWriteOffice
schema 2.0.0

Get-OfficeExcelUsedRange

SYNOPSIS

Reads the used range from an Excel workbook.

SYNTAX

Path (Default)

Get-OfficeExcelUsedRange [-InputPath] <string> [-Sheet <string>] [-SheetIndex <int>] [-HeadersInFirstRow <bool>] [-NumericAsDecimal] [-AsHashtable] [-AsDataTable] [<CommonParameters>]

Document

Get-OfficeExcelUsedRange -Document <ExcelDocument> [-Sheet <string>] [-SheetIndex <int>] [-HeadersInFirstRow <bool>] [-NumericAsDecimal] [-AsHashtable] [-AsDataTable] [<CommonParameters>]

DESCRIPTION

Reads the used range from an Excel workbook.

EXAMPLES

EXAMPLE 1

PS>Get-OfficeExcelUsedRange -Path .\report.xlsx -Sheet 'Data'

Reads the sheet's used range, treating the first row as headers.

PARAMETERS

-AsDataTable

Emit the raw DataTable instead of row objects.

Type: SwitchParameter
Parameter Sets: Path, Document
Aliases: None
Possible values: 

Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-AsHashtable

Emit rows as hashtables instead of PSCustomObjects.

Type: SwitchParameter
Parameter Sets: Path, Document
Aliases: None
Possible values: 

Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-Document

Workbook to inspect.

Type: ExcelDocument
Parameter Sets: Document
Aliases: None
Possible values: 

Required: True
Position: named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: True

-HeadersInFirstRow

Use the first row as column headers.

Type: Boolean
Parameter Sets: Path, Document
Aliases: None
Possible values: 

Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-InputPath

Path to the workbook.

Type: String
Parameter Sets: Path
Aliases: FilePath, Path
Possible values: 

Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-NumericAsDecimal

Prefer decimals instead of doubles for numeric values.

Type: SwitchParameter
Parameter Sets: Path, Document
Aliases: None
Possible values: 

Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-Sheet

Worksheet name to read; defaults to the first sheet.

Type: String
Parameter Sets: Path, Document
Aliases: None
Possible values: 

Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

-SheetIndex

Zero-based worksheet index to read; defaults to the first sheet.

Type: Nullable`1
Parameter Sets: Path, Document
Aliases: None
Possible values: 

Required: False
Position: named
Default value: None
Accept pipeline input: False
Accept wildcard characters: True

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

  • OfficeIMO.Excel.ExcelDocument

OUTPUTS

  • System.Management.Automation.PSObject System.Collections.Hashtable System.Data.DataTable

RELATED LINKS

  • None