Render Excel Chart
Renders a specified chart from an Excel workbook to PDF or image and returns the resulting file.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| Document | File content | Yes | Excel workbook file content (e.g. output of a “Get file content” action from SharePoint or OneDrive). |
| Output Format | String | Yes | Desired render format. Options: .pdf, .png. |
| Worksheet name | String | Yes | Name of the worksheet containing the target chart. |
| Chart name | String | Yes | Name of the chart object within the specified worksheet. |
| Horizontal Resolution | Integer | No | Horizontal resolution for image outputs (in pixels). Required when Output Format is .png. |
| Vertical Resolution | Integer | No | Vertical resolution for image outputs (in pixels). Required when Output Format is .png. |
Returns
| Name | Type | Description |
|---|---|---|
| File content | String (base64‑encoded) | Base64‑encoded bytes of the rendered chart image or PDF, ready for use by downstream actions. |
Troubleshooting
Click to expand common errors and fixes
Document Missing, Truncated or Invalid
Cause:
Workbook payload is empty, truncated, or not a valid Excel file.
Fix:
- Supply the full workbook binary or base64.
- Verify the workbook opens successfully in Excel to confirm it is not corrupted.
Worksheet Not Found
Cause:
Provided worksheet name does not match any sheet in the workbook (case or spelling mismatch).
Fix:
- Verify the exact worksheet name (case-sensitive).
Chart Not Found or Wrong Object Referenced
Cause:
Chart object name is incorrect or you supplied a displayed chart title rather than the chart object name.
Fix:
- Use the chart object’s name (check via the workbook UI or object inspector).
- Ensure the string matches exactly, including spaces and case.
Chart Is Hidden, on a Hidden Sheet, or Not Visible
Cause:
Chart or its worksheet is hidden and cannot be rendered.
Fix:
- Make the chart and its worksheet visible in the workbook prior to rendering.
- If rendering must run against hidden content, ensure the process supports rendering hidden sheets.
Chart Is Embedded but Uses External or Volatile Data References
Cause:
Chart references external data sources or volatile ranges that are not resolvable in the rendering environment.
Fix:
- Ensure all data the chart depends on is present inside the workbook and stable (no broken links).
- Replace external links or refresh and resolve references before rendering.
Unsupported or Complex Chart Elements Render Incorrectly
Cause:
Very complex chart types, custom add-ins, or unsupported chart features (3D effects, live add-ins) may not render as expected.
Fix:
- Simplify chart features where possible or export to PDF (vector) for better fidelity.
- Test with a sample chart to confirm which elements survive rendering.
PNG Output Missing Because Resolution Not Provided
Cause:
Required Horizontal or Vertical Resolution missing for .png.
Fix:
- Provide both Horizontal Resolution and Vertical Resolution as positive integers.
- Choose values appropriate for intended display or print size to avoid pixelation.
Image Clipped, Cropped or Wrong Aspect Ratio
Cause:
Provided resolution and chart aspect ratio mismatch - chart size or plot area causes clipping.
Fix:
- Match output pixel dimensions to the chart’s aspect ratio or increase resolution and scale.
- Ensure chart layout (margins and plot area) fits within the requested size.
PDF Layout or Scaling Issues (Page Breaks, Margins)
Cause:
Page size and scaling defaults cause unexpected pagination or clipping in PDF output.
Fix:
- Use a higher-quality PDF output.
- Adjust the chart and page setup within the workbook (page size, print area) so the chart renders at the intended scale.
Fonts, Legends or Symbols Render Differently
Cause:
Missing fonts or rendering environment differences cause substitution or layout shifts.
Fix:
- Embed fonts or use common system fonts.
- Verify rendering on the target viewer.
Output Corrupted or Cannot Be Opened
Cause:
Returned payload is truncated or incorrectly encoded.
Fix:
- Verify the returned base64 is complete and decodes successfully.
- Reproduce with a minimal test workbook to see if truncation persists.
Performance, Timeouts or Resource Limits with Very Large Charts
Cause:
Extremely high resolutions or very complex charts exhaust processing resources.
Fix:
- Reduce target resolution.
- Simplify chart complexity.
- Paginate renders into smaller jobs.
Generic Runtime or Transient Error
Cause:
Malformed inputs, intermittent rendering engine failure, or unexpected internal error.
Fix:
- Reproduce with a minimal workbook containing a single target chart.
- Validate worksheet and chart names, include required resolutions for
.png, and retry to rule out transient issues.
Quick Checklist
- Document is a full
.xls/.xlsxbinary or base64 (not a path or URL). - Worksheet name exactly matches the sheet containing the chart (case-sensitive).
- Chart name is the chart object name (not the visible title) and matches exactly.
- If Output Format is
.png, supply both Horizontal Resolution and Vertical Resolution as positive integers. - Ensure the chart and worksheet are visible and all data dependencies are internal and resolvable.
- Match output resolution to the chart aspect ratio to avoid clipping or distortion.
- For PDF vector fidelity, prefer
.pdfwhere layout or line art must be preserved. - If output is invalid, reproduce with a minimal test workbook (single sheet plus single named chart) and the exact format and resolution - that input set is necessary to isolate the root cause.