Overview
Populate existing company Excel templates with data using named ranges or table references. Perfect for maintaining standard formatting while dynamically filling in project-specific values.Asynchronous Operation: Returns immediately with a job ID. Poll for the populated file download URL.
Authentication
Bearer token (API key from app.stru.ai)
Request Body
Must be
"populate_template"Base64-encoded .xlsx template file
Key-value pairs mapping named ranges to data values
Named Ranges
Excel templates must use named ranges for the cells you want to populate:- In Excel, select a cell or range
- Go to Formulas → Define Name
- Give it a descriptive name (e.g.,
ProjectName,BeamSpan) - Reference that name in
data_mappings
Example Request
Example Response
Template Setup Guide
1
Design Your Template
Create your Excel template with standard formatting, headers, and placeholders.
2
Define Named Ranges
For each cell you want to populate:
- Select the cell
- Go to Formulas → Define Name
- Enter a descriptive name (e.g.,
ProjectName) - Click OK
3
Test Locally
Verify named ranges are correct:
- Press Ctrl+F3 (Windows) or Cmd+F3 (Mac)
- Review the Name Manager
- Ensure all names are correct
4
Use with API
Reference named ranges in
data_mappings using exact names (case-sensitive).Use Cases
Standard Engineering Calculations
Standard Engineering Calculations
Maintain company-standard calculation templates and populate with project-specific data.
Monthly Reports
Monthly Reports
Generate monthly reports with consistent formatting but dynamic data.
Client-Specific Branding
Client-Specific Branding
Use different templates for different clients while populating with the same data structure.
Batch Report Generation
Batch Report Generation
Generate reports for multiple projects using the same template.
Best Practices
Use descriptive names - Name ranges clearly:
BeamSpan_ft, not B5Test template locally - Verify all named ranges exist and are correct before using with API
Maintain template library - Version control your templates for consistency
Handle missing data - Provide default values for optional fields
Formulas in templates: Your template can contain formulas that reference populated cells. The formulas will recalculate when the file is opened in Excel.
Named range names are case-sensitive: Ensure your
data_mappings keys exactly match the named range names in your template.Error Responses
Named range not found in template
Next Steps
After population:- Download the populated file
- Open in Excel to verify
- Distribute to client or archive in project folder