API Reference

Cmdlet

Get-OfficeDocument

Aliases: Read-OfficeDocument
Namespace PSWriteOffice
Aliases
Read-OfficeDocument
Inputs
System.String
Outputs
OfficeIMO.Reader.OfficeDocumentReadResult System.String

Reads a supported file into the OfficeIMO shared document read result envelope.

Remarks

Use -AsJson for a deterministic serialized payload suitable for indexing or API handoff.

Examples

Authored help example

Read a document envelope as JSON.

PS>


$json = Get-OfficeDocument -Path .\Report.pdf -AsJson -Indented
            $json | Set-Content -Path .\Report.reader.json
        

Reads a supported document and stores the normalized Reader result for indexing or diagnostics.

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.

Syntax

Get-OfficeDocument [-AsJson] [-ExcelA1Range <String>] [-ExcelChunkRows <Nullable`1>] [-ExcelSheetName <String>] [-ExcludePowerPointNotes] [-ExcludeWordFootnotes] [-IncludePageLocations] [-Indented] [-MaxChars <Nullable`1>] [-MaxInputBytes <Nullable`1>] [-MaxTableRows <Nullable`1>] [-NoExcelHeaders] [-NoHashes] [-NoMarkdownHeadingChunks] [-OpenXmlMaxCharactersInPart <Nullable`1>] -Path <String> [-Reader <OfficeDocumentReader>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

AsJson SwitchParameter optionalposition: namedpipeline: False
Return the read result as JSON.
ExcelA1Range String optionalposition: namedpipeline: False
Optional Excel A1 range to read.
ExcelChunkRows Nullable`1 optionalposition: namedpipeline: False
Excel rows per emitted worksheet chunk.
ExcelSheetName String optionalposition: namedpipeline: False
Optional Excel sheet name to read.
ExcludePowerPointNotes SwitchParameter optionalposition: namedpipeline: False
Exclude PowerPoint speaker notes.
ExcludeWordFootnotes SwitchParameter optionalposition: namedpipeline: False
Exclude Word footnotes.
IncludePageLocations SwitchParameter optionalposition: namedpipeline: False
Compute Word page locations and reconstruct RTF pages from explicit page and section breaks. PDF and logical-container formats expose their native page-like locations without this switch.
Indented SwitchParameter optionalposition: namedpipeline: False
Indent JSON output.
MaxChars Nullable`1 optionalposition: namedpipeline: False
Maximum emitted chunk characters.
MaxInputBytes Nullable`1 optionalposition: namedpipeline: False
Maximum input size in bytes.
MaxTableRows Nullable`1 optionalposition: namedpipeline: False
Maximum table rows per emitted table chunk.
NoExcelHeaders SwitchParameter optionalposition: namedpipeline: False
Treat the first Excel row as data instead of headers.
NoHashes SwitchParameter optionalposition: namedpipeline: False
Disable source and chunk hash computation.
NoMarkdownHeadingChunks SwitchParameter optionalposition: namedpipeline: False
Do not split Markdown by headings.
OpenXmlMaxCharactersInPart Nullable`1 optionalposition: namedpipeline: False
OpenXML maximum characters per part.
Path String requiredposition: 0pipeline: True (ByValue)aliases: FilePath
File path to read.
Reader OfficeDocumentReader optionalposition: namedpipeline: False

Outputs

OfficeIMO.Reader.OfficeDocumentReadResult System.String