Fix Power Automate OneDrive Excel to PDF Showing Old Formula Results
Question details
The user needs to ensure that Excel formula cells display recalculated, up-to-date results when converting a worksheet to PDF using Power Automate and OneDrive.

- Product
- Microsoft Excel, Power Automate, OneDrive
- Device & OS
- not provided
- Scenario
- Converting an automated Excel worksheet to a PDF file via Power Automate through OneDrive.
- Observed behavior
- Non-formula cells convert correctly to the PDF, but formula cells display zeros or outdated results instead of the latest calculated values.
Ensure that your Excel workbook is set to automatic calculation and that all external data connections or scripts are fully processed before the automated flow reaches the conversion step.
Force Excel Recalculation and Save Before Conversion
Ensure the workbook calculates and saves the latest formula results before passing the file to the OneDrive PDF conversion step.
Power Automate's OneDrive PDF converter reads the last saved state of the Excel file. If the file is modified by a background script or flow but not opened and saved, formulas may not trigger their recalculation engine, resulting in zero or cached values in the output PDF.
Open the source Excel workbook in the desktop app or Excel Online. Navigate to the Formulas tab, click Calculation Options, and ensure it is set to 'Automatic'.
In your Power Automate flow, insert a 'Delay' action (e.g., 30 to 60 seconds) right before the OneDrive 'Convert file' step to allow cloud synchronization and background calculations to finish.
Use the 'Run script' action in Power Automate to execute a simple Office Script that explicitly calculates all formulas (e.g., using workbook.getApplication().calculate) before the conversion step.
Verify Target File and Worksheet Integrity
Confirm that your automated flow is grabbing the correct, updated version of the Excel file rather than an older cached version.
Try WPS Office for Reliable Excel to PDF Conversion
If you frequently encounter calculation or formatting errors when exporting PDFs from complex spreadsheets, consider switching to WPS Office. It provides a highly compatible environment with robust built-in PDF conversion that accurately captures all formula results.
- 1. Open the Workbook: Launch WPS Spreadsheets and open your .xlsx file.
- 2. Verify Calculations: Wait a moment for all formulas to automatically calculate and display the latest results.
- 3. Export Directly to PDF: Go to the 'Menu' button, select 'Export to PDF', adjust your formatting preferences, and click 'Export' to get an accurate document.

Frequently Asked Questions
Why do Excel formulas show as zero when converted to PDF in Power Automate?
This happens because the Excel recalculation engine hasn't triggered. When data is injected via automation, the file's xml structure is updated but the formulas aren't evaluated until the file is opened by an Excel application or explicitly forced to calculate via scripts.
Can I force an Excel file to recalculate without manually opening it?
Yes. In cloud environments like Power Automate, you can utilize Excel Online (Business) connectors to run an Office Script that forces a full recalculation before you pass the file to the PDF conversion step.
Does OneDrive cache old versions of the Excel file during flow execution?
Sometimes OneDrive file synchronization has a slight processing delay. Adding a 30 to 60-second delay action in Power Automate before the PDF conversion step ensures the latest updated and saved version is converted.
Why do static text cells convert correctly but formulas fail?
Static values are written directly to the file's structural code and are immediately readable by the OneDrive PDF converter. Formulas, however, require an engine to evaluate them, which the simple background file conversion tool does not do automatically.




