Skip to main content

Extract Worksheets from Excel using Zapier

PDF4me Extract Worksheets from Excel is a Zapier action that exports one or more worksheets from an Excel workbook as structured JSON, keyed by sheet name. Select worksheets by name, by index, or leave both empty to extract every sheet. Returns a Base64-encoded JSON document ready for the next Zap step.

What this action does

Takes an Excel workbook from a previous Zap step, reads the worksheets you specify (or all of them), and converts each one to JSON using the first row as headers. The result is a single dictionary keyed by worksheet name, so a workbook with a Summary and a Sales sheet returns one JSON object with both keys. Useful for feeding multi-sheet reports into APIs, databases, or downstream automation steps that expect structured data instead of a spreadsheet file.

Related Blog Posts
No blog post yet for this feature — coming soon.
In the meantime, browse the PDF4me blog for tutorials and workflows across every platform.
Visit the blog

Authenticating Your API Request

To access the PDF4me Web API through Zapier, every request must include proper authentication credentials. Authentication ensures secure communication and validates your identity as an authorized user, enabling seamless integration between your Zapier workflows and PDF4me's Excel worksheet extraction services.

Important Facts You Should Not Miss

Only File is strictly required
File Name, Worksheet Names, and Worksheet Indexes are all optional in the Zapier configuration. Leave the worksheet fields empty to extract everything.
Names and Indexes combine, they do not filter each other
If you set both Worksheet Names and Worksheet Indexes, PDF4me extracts the union, every sheet that matches either condition, not only sheets matching both.
Output is a dictionary keyed by worksheet name
Each extracted worksheet becomes its own key in the decoded JSON, so multi-sheet workbooks stay organized in a single response instead of separate files.
Map File and File Name from previous steps

Use the + button next to File and File Name to map from earlier Zap steps, e.g., Full File Name from a previous PDF4me Excel action. The Excel file must provide full content, not "Exists but not shown" references.

File: (Exists but not shown)

If you see "File: (Exists but not shown)" in the File field and get "File is Empty" errors, select the option that provides the full file content instead. See Zapier & Power Automate Tips for details.

PDF4me Excel Extract Worksheets Zapier configuration - File, File Name, Worksheet Names, Worksheet Indexes
Configure the Excel Extract Worksheets action: only File carries an asterisk, File Name and both worksheet-targeting fields are optional.

What Are the Key Features of Extract Worksheets?

  • Complete Worksheet Extraction to JSON with automatic header detection
  • Flexible Selection: extract by Worksheet Names, Worksheet Indexes, or both (union)
  • Multi-Sheet Support extracts multiple worksheets in one operation
  • Dictionary Output keyed by worksheet name for easy access
  • 1-Based Indexing for Worksheet Indexes

Parameters

Complete list of parameters for the Extract Worksheets action. Parameter names match the Zapier configuration UI shown in the screenshot above.

Quick setup checklist
  1. Map File (Excel) from your trigger or a previous step
  2. Optionally map File Name (e.g., Full File Name from previous step)
  3. Enter Worksheet Names and/or Worksheet Indexes, or leave both empty to extract every sheet
ParameterRequiredWhat it doesExample
FileRequiredExcel file to extract worksheets from. Map from a previous step. Must provide full file content.[2. File from Step 2]
File NameConditionalExcel filename, used for output file identification.add_header_sample_file.xlsx
Worksheet NamesConditionalComma-separated worksheet names to extract. Combines (union) with Worksheet Indexes if both are set. Empty with Indexes = all worksheets.Sheet1, Sheet2
Worksheet IndexesConditionalComma-separated 1-based worksheet positions to extract. 1 = first worksheet. Combines with Worksheet Names.1,3
Extract every worksheet in the workbook

Leave both Worksheet Names and Worksheet Indexes empty to extract all worksheets in the workbook into the output dictionary.

Important: Only File is required. Use the + button next to each field to map data from previous steps. Worksheet indexes are 1-based (1 = first worksheet).

What Does Extract Worksheets Return?

The PDF4me Extract Worksheets from Excel action returns worksheet data as a Base64-encoded JSON document, not a downloadable file, for direct use in Zap logic.

FieldTypeWhat it contains
documentBase64JSON byte array. Decodes to a dictionary keyed by worksheet name, each value an array of row objects.
FileNameStringOutput filename assigned to the JSON payload, e.g. report.txt.
SuccessBooleanWhether the extraction completed without error.

Example JSON response:

{
"document": "[Base64 JSON]",
"FileName": "report.txt",
"Success": true
}

Extracted JSON structure (decoded from document):

{
"Summary": [
{"Month": "January", "Revenue": 50000, "Expenses": 30000},
{"Month": "February", "Revenue": 55000, "Expenses": 32000}
],
"Sales": [
{"Product": "Widget A", "Quantity": 100, "Price": 10.50},
{"Product": "Widget B", "Quantity": 150, "Price": 15.75}
]
}

Typical Setups

Workflow ExamplesCommon Zapier workflow patterns using Extract Worksheets.
Multi-sheet API distribution
  1. A trigger fires when a consolidated report workbook lands in a Google Drive folder.
  2. PDF4me Extract Worksheets maps File and File Name, leaving Worksheet Names and Worksheet Indexes empty to extract every sheet as one JSON dictionary.
  3. A Formatter step decodes the Base64 document, then separate steps route each worksheet's data to its own destination API.
Selective export for a client request
  1. A form-submission trigger captures which worksheets a client wants from a shared master workbook.
  2. PDF4me Extract Worksheets sets Worksheet Names to the requested sheet list (e.g., "Q1, Q2") so only those sheets are pulled.
  3. The decoded JSON is sanitized and delivered to the client portal or emailed as an attachment.
Archiving specific summary tabs
  1. A scheduled trigger runs on the last day of each month.
  2. PDF4me Extract Worksheets sets Worksheet Indexes to the known positions of the summary tabs (e.g., "1,2"), skipping detail sheets.
  3. The extracted JSON is written to a database or blob storage step for long-term retention.

Practical Tips

File: (Exists but not shown) causes errors
Select the mapping option that provides the file's full binary content instead of a reference. See Zapier & Power Automate Tips for the exact steps.
Only File is required, everything else is optional
Leave Worksheet Names and Worksheet Indexes empty to extract every worksheet, there is no need to list sheet names if you want the whole workbook.
Names and Indexes combine, they do not filter each other
Setting both fields extracts the union of matching sheets, not the intersection. Use only one field if you want a strict match.
Worksheet Indexes start at 1, not 0
The first worksheet in the workbook is index 1. This trips up developers used to zero-based array indexing in other tools.
The output is JSON, not a spreadsheet file
Decode the Base64 document field to get the worksheet dictionary. There is no separate downloadable Excel file in this action's response.

Cheat Sheet

FieldValue
ActionExtract Worksheets
File[Mapped from previous step]
File Nameadd_header_sample_file.xlsx
Worksheet NamesSheet1, Sheet2 (optional)
Worksheet Indexes1,3 (optional, 1-based)
Output formatBase64-encoded JSON dictionary

Common Questions

How do I extract a specific worksheet from an Excel file in Zapier?+
Add the PDF4me Extract Worksheets action to a Zap, map File and File Name from a previous step using the full-content option, then enter the sheet name in Worksheet Names or its position in Worksheet Indexes. See Zapier's guide to working with files for how file fields pass between steps.
Can I extract all worksheets from a workbook at once?+
Yes. Leave both Worksheet Names and Worksheet Indexes empty and PDF4me extracts every worksheet in the workbook into a single JSON dictionary keyed by sheet name.
What format is the extracted worksheet data returned in?+
The document field is a Base64-encoded JSON byte array. Decoded, it is a dictionary where each key is a worksheet name and each value is an array of row objects, using the first row of each sheet as the property names.
Is File the only required field?+
Yes. In the Zapier configuration, only File is marked required. File Name, Worksheet Names, and Worksheet Indexes are all optional.
How does Worksheet Indexes numbering work?+
Worksheet Indexes uses 1-based numbering, so the first worksheet in the workbook is index 1, the second is index 2, and so on, different from zero-based indexing used in many programming languages.

Same Task on Other Platforms

Industry Use Cases & Applications

  • Multi-API Feeds: extract different worksheets to different system APIs automatically
  • Data Warehouse Loading: load multi-sheet financial workbooks to data warehouse tables
  • System Migration: extract complete Excel workbooks to JSON for migration to cloud systems
  • Data Backup: archive multi-sheet operational workbooks as JSON for disaster recovery
  • ETL Pipeline: extract worksheets as intermediate format in multi-step transformation pipelines

Get Help