Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Get-OfficeDocumentChunk

Aliases: Read-OfficeDocumentChunk
Module 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.

Syntax

Get-OfficeDocumentChunk [-AllStoreItems] [-ExcelA1Range <String>] [-ExcelChunkRows <Int32>] [-ExcelSheetName <String>] [-ExcludePowerPointNotes] [-ExcludeWordFootnotes] [-MaxChars <Int32>] [-MaxInputBytes <Int64>] [-MaxStoreItems <Int32>] [-MaxTableRows <Int32>] [-NoExcelHeaders] [-NoHashes] [-NoMarkdownHeadingChunks] [-OpenXmlMaxCharactersInPart <Int64>] [-Path] <String> [-Reader <OfficeDocumentReader>] [<CommonParameters>]
#
Parameter set: File
Get-OfficeDocumentChunk [-AllStoreItems] [-ExcelA1Range <String>] [-ExcelChunkRows <Int32>] [-ExcelSheetName <String>] [-ExcludePowerPointNotes] [-ExcludeWordFootnotes] [-Extension <String[]>] -FolderPath <String> [-MaxChars <Int32>] [-MaxFiles <Int32>] [-MaxInputBytes <Int64>] [-MaxStoreItems <Int32>] [-MaxTableRows <Int32>] [-MaxTotalBytes <Int64>] [-NoExcelHeaders] [-NoHashes] [-NoMarkdownHeadingChunks] [-NoRecurse] [-OpenXmlMaxCharactersInPart <Int64>] [-Reader <OfficeDocumentReader>] [<CommonParameters>]
#
Parameter set: Folder

Description

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.

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.

Parameters

-AllStoreItems SwitchParameter optional
Project every matching item from each email store.
-ExcelA1Range String optional
Optional Excel A1 range to read.
-ExcelChunkRows Int32 optional
Excel rows per emitted worksheet chunk.
-ExcelSheetName String optional
Optional Excel sheet name to read.
-ExcludePowerPointNotes SwitchParameter optional
Exclude PowerPoint speaker notes.
-ExcludeWordFootnotes SwitchParameter optional
Exclude Word footnotes.
-MaxChars Int32 optional
Maximum emitted chunk characters.
-MaxInputBytes Int64 optional
Maximum input size in bytes.
-MaxStoreItems Int32 optional
Maximum PST, OST, OLM, or EMLX items projected from each store. The default is 1,000.
-MaxTableRows Int32 optional
Maximum table rows per emitted table chunk.
-NoExcelHeaders SwitchParameter optional
Treat the first Excel row as data instead of headers.
-NoHashes SwitchParameter optional
Disable source and chunk hash computation.
-NoMarkdownHeadingChunks SwitchParameter optional
Do not split Markdown by headings.
-OpenXmlMaxCharactersInPart Int64 optional
OpenXML maximum characters per part.
-Path String requiredposition: 0pipeline: True (ByValue, ByPropertyName)aliases: FilePath, FullName, LiteralPathsets: File
File path to read.
-Reader OfficeDocumentReader optional
Optional immutable OfficeIMO reader with caller-configured handlers and processors.
-Extension String[] optionalaliases: Extensionssets: Folder
Allowed folder extensions such as .docx, .xlsx, .pdf, or md.
-FolderPath String requiredsets: Folder
Folder path to read.
-MaxFiles Int32 optionalsets: Folder
Maximum number of folder files to read.
-MaxTotalBytes Int64 optionalsets: Folder
Maximum total folder bytes to read.
-NoRecurse SwitchParameter optionalsets: Folder
Do not recurse into child folders when reading a folder.

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.