API Reference

Cmdlet

Get-OfficeDocumentChunk

Aliases: Read-OfficeDocumentChunk
Namespace PSWriteOffice
Aliases
Read-OfficeDocumentChunk
Inputs
System.String
Outputs
OfficeIMO.Reader.ReaderChunk

Reads supported Office, PDF, Markdown, RTF, HTML, CSV, JSON, XML, YAML, ZIP, EPUB, Visio, and text files into normalized OfficeIMO.Reader chunks.

Remarks

This is a thin adapter over OfficeDocumentReader. The OfficeIMO.Reader engine owns detection, extraction, hashing, and chunk shaping.

Examples

Authored help example

Read semantic chunks from an RTF document.

PS>


New-OfficeRtf -Path .\Report.rtf -Text 'Summary', 'Ready for review'
            Get-OfficeDocumentChunk -Path .\Report.rtf | Select-Object Kind, Text
        

Creates a small RTF file and reads it back through the Reader adapter as normalized chunks.

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-OfficeDocumentChunk [-ExcelA1Range <String>] [-ExcelChunkRows <Nullable`1>] [-ExcelSheetName <String>] [-ExcludePowerPointNotes] [-ExcludeWordFootnotes] [-MaxChars <Nullable`1>] [-MaxInputBytes <Nullable`1>] [-MaxTableRows <Nullable`1>] [-NoExcelHeaders] [-NoHashes] [-NoMarkdownHeadingChunks] [-OpenXmlMaxCharactersInPart <Nullable`1>] -Path <String> [-Reader <OfficeDocumentReader>] [<CommonParameters>]
#
Parameter set: File

Parameters

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.
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.ReaderChunk

Get-OfficeDocumentChunk [-ExcelA1Range <String>] [-ExcelChunkRows <Nullable`1>] [-ExcelSheetName <String>] [-ExcludePowerPointNotes] [-ExcludeWordFootnotes] [-Extension <String[]>] -FolderPath <String> [-MaxChars <Nullable`1>] [-MaxFiles <Nullable`1>] [-MaxInputBytes <Nullable`1>] [-MaxTableRows <Nullable`1>] [-MaxTotalBytes <Nullable`1>] [-NoExcelHeaders] [-NoHashes] [-NoMarkdownHeadingChunks] [-NoRecurse] [-OpenXmlMaxCharactersInPart <Nullable`1>] [-Reader <OfficeDocumentReader>] [<CommonParameters>]
#
Parameter set: Folder

Parameters

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.
Extension String[] optionalposition: namedpipeline: Falsealiases: Extensions
Allowed folder extensions such as .docx, .xlsx, .pdf, or md.
FolderPath String requiredposition: namedpipeline: False
Folder path to read.
MaxChars Nullable`1 optionalposition: namedpipeline: False
Maximum emitted chunk characters.
MaxFiles Nullable`1 optionalposition: namedpipeline: False
Maximum number of folder files to read.
MaxInputBytes Nullable`1 optionalposition: namedpipeline: False
Maximum input size in bytes.
MaxTableRows Nullable`1 optionalposition: namedpipeline: False
Maximum table rows per emitted table chunk.
MaxTotalBytes Nullable`1 optionalposition: namedpipeline: False
Maximum total folder bytes to read.
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.
NoRecurse SwitchParameter optionalposition: namedpipeline: False
Do not recurse into child folders when reading a folder.
OpenXmlMaxCharactersInPart Nullable`1 optionalposition: namedpipeline: False
OpenXML maximum characters per part.
Reader OfficeDocumentReader optionalposition: namedpipeline: False

Outputs

OfficeIMO.Reader.ReaderChunk