New Power Apps PCF arrived: Document Processor
This is a Power Apps Component Framework (PCF) control for fast, local Excel parsing and multi-file drag&drop uploadβno slow SharePoint handoffs or long Power Automate loops. π
β¨ Why this exists
A common Excel parsing workflow: Upload the file to SharePoint β wait for Power Automate to trigger β iterate through a formatted table.
That approach works, but slow, inefficient, and large tables often stall. It doesnβt have to be like that.
This Document Processor PCF extracts tables locally, lightning fast and returns clean JSON you can immediately use in your app or send to downstream Power Automate flows, AI Builder, agents, or other services. βοΈ
π§ What it does
π Excel parsing modes
π Fixed Range Mode
- Parse a specific, predefined cell range (e.g.,
Sheet1!A1:B2
). - Optional AutoHeader: Add header to data that doesnt have one
π§± Fixed Column Mode
- Provide a starting header range (e.g.,
Sheet1!B2:Z2
). The parser reads columns B β Z starting at row 2, and continues until hit the first blank row. - Ideal for standardized templates (e.g., purchase orders with variable row counts).
π Dynamic Search Mode
- Scans all worksheets (across multiple files) to detect every table.
- A βtableβ = any continuous block of cells with no blank rows or columns interrupting it.
Originally a tool of my MCP server, this lets you extract all tables and hand them to AI Builder, or your remote agent for deeper analysis and richer context. π€
Dynamic mode parses all tables across all sheets
π§° Other features
- ποΈ Multiple file upload with drag & drop
- π±οΈ Enhanced button UX (multi-line caption, icon options)
- π§© Extension limiting to control allowed file types
- π¨ Theme inheritance from Power Apps
- π Progress spinner and optional secondary text for better feedback
π¨π»βπ» Download here:
DocumentProcessor_Managed_1.0.0.zip
π Params
π§ Inputs (key properties)
- Text: Button label.
- ButtonIcon:
Attach | Add document | ArrowUpload
. - IconStyle:
Outline | Filled
. - ParsingMode:
Dynamic | Fixed range | Fixed column
. - AutoHeader:
true | false
(use with Fixed Range/Fixed Column when the dataset lacks headers). - targetRange:
- Fixed Range: e.g.,
Sheet1!A1:B2
. - Fixed Column: header row span, e.g.,
Sheet1!B2:Z2
. - Dynamic: ignored.
- Fixed Range: e.g.,
- AllowMultipleFiles: Enable multi-file selection.
- AllowedFileTypes: Semicolon-separated extensions (e.g.,
xlsx;xls
). - AllowDropFiles & AllowDropFilesText: Drag & drop and its hint text.
- ShowActionSpinner: Show a spinner while processing.
- ShowSecondaryContent & SecondaryContent: Helper text under the label.
- Appearance:
Primary | Secondary | Outline | Subtle | Transparent
. - Align:
Left | Center | Right | Justify
. - FontWeight:
Bold | Lighter | Normal | Semibold
. - IconPosition:
Before | After
. - Shape:
Rounded | Circular | Square
. - ButtonSize:
Small | Medium | Large
. - Width / Height / Visible: Layout controls.
π€ Outputs
- FilesAsJSON: JSON array of selected files (Base64 and metadata).
- ExcelOutput: JSON array of parsed table objects for Power Fx or downstream APIs/Agents.
Dependencies & notes
targetRange
is required in Fixed Range and Fixed Column modes (format differs).targetRange
is not used in Dynamic mode.
πΌοΈ Base64 output (non-Excel too)
When you upload other file types, the control also returns an array of Base64 strings (one object per file) via FilesAsJSON
.
Great for:
- Sending images to AI Vision models. ποΈ
- Uploading to Blob storage or APIs without extra conversions. βοΈ
π Security & privacy
- Parsing happens client-side in the app session.
- Although it was designed to dodge Formula Injection Attacks, you should validate and sanitize sensitive outputs before forwarding them to external services.
- Use AllowedFileTypes to restrict uploads in sensitive apps.
π Quick start
- Import the PCF control into your solution. π¦
- Add the control to your canvas app screen. π§±
- Configure:
- Choose ParsingMode.
- Fixed Range: set
targetRange
likeSheet1!A1:H50
. - Fixed Column: set
targetRange
likeSheet1!B2:Z2
. - Toggle AutoHeader if needed.
- Use outputs:
- Read
ExcelOutput
for structured tables. - Read
FilesAsJSON
for Base64 content (e.g., AI Vision or storage).
- Read