Aspose.Slides does not support relative ExternalWorkbookPath for linked charts (PowerPoint supports this natively on Windows)
Issue Summary
PowerPoint on Windows supports linking a chart to an external Excel workbook using a relative path, where the link contains only the filename without extension (e.g., BudgetTemplate).
When setting the external workbook path using Aspose.Slides via:
chart.ChartData.SetExternalWorkbook("NewReportName", false);
Aspose instead serializes the link as an absolute file path, pointing to the working directory inside the container (e.g., file:///usr/lib/NewReportName.xlsx).
This prevents PowerPoint from resolving the correct workbook once the files are downloaded and opened by the user.
We need Aspose.Slides to support relative external workbook paths, exactly the way PowerPoint natively does.
Expected Behavior (Native PowerPoint, Windows)
In PowerPoint for Windows, you can link a chart to an Excel file by placing both files in the same folder.
PowerPoint stores just the workbook name:
ExternalWorkbookPath = "BudgetTemplate"
There is no file:// , no absolute path , and often no extension .
When the user opens the PPTX, PowerPoint resolves the Excel file relative to the slideshow’s location automatically. Results in Aspose generating something like:
file:///usr/lib/NewReportName.xlsx
(where /usr/lib/ is the working directory of our Docker container).
When the user downloads the final report as a ZIP (containing both the PPTX and the Excel file in the same folder), PowerPoint cannot resolve the link, and the user must manually relink every chart.
Why This Matters (Our Use Case, Astrato Analytics)
Our product Astrato Analytics (astrato.io) generates automated PowerPoint reports based on user-provided PPTX and XLSX templates.
Workflow:
- User uploads a PPTX template and an XLSX template.
- Inside our Dockerized backend, we load and update the Excel file.
- We update the PowerPoint charts using:
chart.ChartData.SetExternalWorkbook(tempExcelPath, true);
- When we’re done, we prepare a ZIP file for the user containing:
- NewReportName.pptx
- NewReportName.xlsxBoth in the same folder inside the zip.At this point, we want to set the chart’s external link to the final Excel filename without path, e.g.:
chart.ChartData.SetExternalWorkbook("NewReportName", false);
- so that PowerPoint can resolve the Excel workbook relative to the PPTX location, as it does natively on Windows.
- The user unzips the file and opens NewReportName.pptx.PowerPoint should then automatically resolve the link to NewReportName.xlsx in the same folder.
However, Aspose.Slides currently rewrites this relative name into an absolute path based on the Docker working directory, for example:
file:///usr/lib/NewReportName.xlsx
When the user unzips and opens the file on Windows, this path is invalid in their environment. PowerPoint cannot find the workbook and the chart link must be manually repaired.
If Aspose would preserve the relative external workbook path, e.g.:
ExternalWorkbookPath = "NewReportName"
PowerPoint on Windows would correctly resolve the link as intended.
Feature Request
Please add support for:
- Relative external workbook paths , e.g.:
ExternalWorkbookPath = "NewReportName" - without file:// and without an absolute directory.
- When updateChartData = false, do not rewrite the given path into an absolute URI.Instead, preserve the path exactly as passed to SetExternalWorkbook, so we can intentionally set a relative reference that PowerPoint will resolve at runtime.
Impact
This behavior breaks our automated reporting scenario:
- Users receive a PPTX + XLSX zip with matching names.
- PowerPoint cannot resolve the Excel links because the paths are turned into absolute container paths instead of relative names.
- Users are forced to manually repair links, defeating the purpose of automation.
Relative path support (or at least preserving the provided relative path) would solve this cleanly.