Delete Worksheet from Excel - Workbook Cleanup for Make
PDF4me Delete Worksheet from Excel removes one or more worksheets by names and/or indexes from Excel workbooks within Make scenarios, with automatic safety validation ensuring at least one worksheet always remains. Uses union logic when both names and indexes are provided, handles duplicate selections gracefully, and processes template cleanup, calculation sheet removal, and rolling archive maintenance workflows. Works with Google Drive, Dropbox, SharePoint, and cloud storage platforms.
When you provide both Worksheet Names and Worksheet Indexes, the module deletes the union of all worksheets matched by either selector. Duplicate overlaps (a name that refers to the same tab as an index) are handled automatically with no error. Leave both fields empty and the module will error — at least one selector must be provided, and at least one worksheet must survive deletion.
Worksheet Indexes uses 1-based numbering — worksheet 1 is the first tab, 2 is the second. Provide a comma-separated string like "1,3" to delete the first and third worksheets. This differs from the Add Text Watermark module which uses 0-based indexing, so always verify index conventions when building multi-module Excel scenarios.
For rolling 12-month workbooks, use a Set Variable step to build a comma-separated list of worksheet names older than the retention window (e.g., "Jan2024,Feb2024") and map it to Worksheet Names. This enables fully automated monthly archive maintenance without hardcoding worksheet names, keeping file size and performance optimal as new month sheets are added.
Authenticating Your API Request
To access the PDF4me Web API through Make, every request must include proper authentication credentials. Authentication ensures secure communication and validates your identity as an authorized user, enabling seamless integration between your Make scenarios and PDF4me's Excel worksheet management services.

Key Features
- Delete by Names or Indexes with union selection logic
- Multiple Worksheets in one operation
- Safety Validation to prevent deleting all worksheets
- Flexible Selection: Combine names and indexes for comprehensive targeting
- Graceful Duplicate Handling: Duplicate selections automatically resolved
Parameters
Complete list of parameters for the Delete Worksheet from Excel module. Configure these parameters to control worksheet deletion behavior.
Important: Parameters marked with an asterisk (***) are required and must be provided for the module to function correctly. At least one worksheet must remain after deletion.
| Parameter | Type | Description | Example |
|---|---|---|---|
| File Name*** | String | Excel Document Name • Filename with .xlsx or .xls extension • Used for output identification • Supports dynamic naming from scenario variables | data.xlsx |
| Document*** | Buffer | Excel File Content • Map from previous module (Drive/Dropbox/HTTP) • Binary Excel document for worksheet deletion • Workbook must contain at least 2 worksheets | [Buffer] |
| Worksheet Names | String | Deletion by Name • Comma-separated list of worksheet names to delete • Exact case-sensitive matching required • Example: "Temp,Draft,Old" deletes three worksheets • Combined with Worksheet Indexes via union logic | Temp,Draft,Old |
| Worksheet Indexes | String | Deletion by Index (1-based) • Comma-separated list of worksheet indexes • 1 = first worksheet, 2 = second, etc. • Example: "1,3" deletes first and third worksheets • Combined with Worksheet Names via union logic | 1,3 |
Output
The PDF4me Delete Worksheet from Excel module returns comprehensive output data for seamless Make scenario integration:
- Table
- JSON
- Scenario Integration
Table View
Response data in a structured table format:
| Parameter | Type | Description |
|---|---|---|
| Name | String | Output Excel filename |
| Doc Data | Buffer | Excel workbook with specified worksheets deleted |
JSON Response Format
The raw JSON response from the module:
{
"Name": "data.xlsx",
"Doc Data": "[Buffer Data]"
}
Make Scenario Usage
Use Excel with deleted worksheets in subsequent modules:
- Template Cleanup: Remove sample worksheets before distribution
- Report Finalization: Delete draft/calculation sheets before publishing
- File Size Optimization: Remove unused worksheets to reduce file size
- Client Distribution: Clean internal-only worksheets before sharing
Scenario Examples
The PDF4me Delete Worksheet from Excel module in Make provides comprehensive scenario templates designed for real-world workbook management needs:
- Template Cleanup
- Report Finalization
- Archive Cleanup
Automated Template Sample Worksheet Removal Workflow
Prepare distribution-ready templates by removing sample worksheets automatically:
Complete Scenario Steps:
- Trigger: Template marked ready for distribution in content management system
- Get Master Template: Retrieve template workbook with sample worksheets from library
- Identify Sample Worksheets: Worksheets named "Sample Data", "Example", "Instructions"
- Delete Sample Worksheets: Remove "Sample Data,Example,Instructions" by name
- Preserve Core Worksheets: Main worksheets ("Template", "Reference") retained
- Verify Worksheet Count: Ensure at least one worksheet remains after deletion
- Upload Clean Template: Save distribution-ready template to public folder
- Email Users: Notify team of new clean template availability with download link
- Archive Sample Version: Store template with samples in archive for reference
- Update Template Registry: Mark template as distributed in content registry
Business Benefits:
- Prepares 20+ templates monthly for distribution automatically
- Removes sample worksheets preventing user confusion
- Reduces template file size by 30-50% on average
- Saves 20 minutes per template in manual worksheet cleanup
Automated Report Calculation Sheet Removal Workflow
Finalize reports by removing internal calculation worksheets automatically:
Complete Scenario Steps:
- Trigger: Weekly executive report generation completion event
- Get Full Report: Retrieve complete report with calculation sheets from Google Drive
- Identify Internal Worksheets: Calculation worksheets by index (worksheets 2, 4, 5)
- Delete Calculation Sheets: Remove "2,4,5" by indexes (1-based)
- Preserve Presentation Sheets: Executive summary and analysis sheets retained
- Verify Workbook Integrity: Check formulas and references still valid
- Upload Final Report: Save executive-ready report to management folder
- Email Leadership: Send notification with finalized report to C-suite
- Archive Full Version: Store complete report with calculations in archive
- Log Finalization: Record finalization event with timestamp and sheet counts
Business Benefits:
- Finalizes 52 executive reports annually automatically
- Removes internal calculation complexity from executive view
- Reduces report file size improving email distribution
- Eliminates manual worksheet deletion saving 15 minutes per report
Automated Historical Worksheet Removal Workflow
Maintain rolling data windows by removing obsolete historical worksheets:
Complete Scenario Steps:
- Trigger: Monthly archive maintenance scheduled on last day of month
- Get Rolling Report: Retrieve 12-month rolling report from SharePoint
- Identify Old Month Worksheets: Worksheets older than 12 months by name pattern
- Build Deletion List: Dynamically create comma-separated names (e.g., "Jan2023,Feb2023")
- Delete Old Worksheets: Remove historical month worksheets beyond retention
- Preserve Recent Months: Last 12 months of worksheets retained
- Add New Month: Insert new month worksheet for current period
- Upload Updated Report: Save trimmed rolling report back to SharePoint
- Archive Removed Sheets: Store deleted month worksheets in separate archive workbook
- Email Finance Team: Send rolling report maintenance completion notification
Business Benefits:
- Maintains 12-month rolling window automatically
- Removes 12+ obsolete worksheets annually per rolling report
- Keeps file size manageable and performance optimal
- Eliminates manual rolling window maintenance saving 30 minutes monthly
Industry Use Cases & Applications
- Finance & Accounting
- Sales & Marketing
- Human Resources
- Operations & IT
- Client Report Finalization: Remove internal calculation and assumption worksheets from client financial reports
- Budget Template Cleanup: Delete previous year worksheets from budget templates for new fiscal year
- Audit File Preparation: Remove draft and working paper worksheets before audit file archival
- Rolling Forecast Maintenance: Delete obsolete month worksheets from 12-month rolling forecast workbooks
- Consolidation Cleanup: Remove individual entity worksheets after consolidation sheet creation
- Proposal Finalization: Delete pricing calculation and margin analysis worksheets from client proposals
- Template Distribution: Remove sample campaign and example data worksheets from marketing templates
- Territory Report Cleanup: Delete inactive territory worksheets from regional performance reports
- Campaign Archive: Remove test and draft campaign worksheets from archived campaign workbooks
- CRM Export Cleanup: Delete metadata and mapping worksheets from CRM data exports
- Benefits Template Cleanup: Remove previous year's plan worksheets from benefits enrollment templates
- Payroll Report Finalization: Delete calculation and validation worksheets from distributed payroll reports
- Performance Review Cleanup: Remove calibration and scoring worksheets from finalized review workbooks
- Headcount Report Maintenance: Delete historical month worksheets beyond 18-month retention
- Training Log Cleanup: Remove obsolete training session worksheets from master training logs
- Dashboard Finalization: Remove data source and ETL worksheets from published dashboards
- Inventory Template Cleanup: Delete example warehouse worksheets from multi-site inventory templates
- Production Report Cleanup: Remove shift detail worksheets from weekly production summaries
- File Size Optimization: Delete unused and hidden worksheets to improve workbook performance
- System Export Cleanup: Remove technical metadata worksheets from system data exports