Fix Excel 2306 ExportAsFixedFormat Error When Creating PDFs
Question details
The user needs to resolve an Excel 2306 COMException error that prevents an external program from generating PDF reports using the ExportAsFixedFormat command.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Using a third-party application or script to automate the generation and export of PDF reports from Excel workbooks.
- Observed behavior
- Excel throws a COMException with error code 2306 stating 'File not saved', successfully blocking the creation of the PDF report. This often begins immediately following an Office update.
Ensure you have administrative privileges to modify folder permissions, and temporarily pause any third-party antivirus software that might be blocking automated file creation.
Perform a Manual PDF Export and Verify Paths
Isolate the problem by testing if Excel can natively generate a PDF, which helps determine if the issue stems from folder permissions or the external application's API call.
Before altering system configurations, it is crucial to confirm whether the core PDF export engine in Excel is functioning correctly.
Launch Microsoft Excel manually and open the specific file that the external program is failing to convert.
Navigate to the 'File' menu, select 'Export', and click on 'Create PDF/XPS Document'.
Choose a fully accessible local folder, such as your Desktop or Documents folder, to rule out network or restricted folder permission issues.
Click 'Publish'. If the PDF generates successfully, the issue is likely tied to the external program's specific save path permissions or a broken COM link.

Rollback the Recent Microsoft Office Update
If the error began immediately after an Office update, reverting to a previously stable version can temporarily bypass the bug until Microsoft patches it.
Report to Microsoft 365 Support
Since error 2306 can be a deep-rooted COMException tied to specific update builds, escalating the issue to official enterprise support is necessary for a permanent fix.
Ensure Stable PDF Generation with WPS Office
If frequent Microsoft Office updates disrupt your automated workflows and PDF exports, consider switching to WPS Office. It delivers robust spreadsheet management, native PDF generation capabilities, and a stable environment without disruptive update cycles.
- 1. Download the Software: Visit the official WPS Office website to download the free installation package.
- 2. Install WPS Office: Run the downloaded installer and follow the simple on-screen instructions to set up the suite on your device.
- 3. Export Spreadsheets to PDF: Open your data in WPS Spreadsheets, click the 'Menu' button, and select 'Export to PDF' for reliable document conversion.

Frequently Asked Questions
What causes the Excel 2306 ExportAsFixedFormat error?
This COMException 'File not saved' error is typically caused by a recent Microsoft Office update that interferes with the COM API, insufficient write permissions in the target directory, or third-party security software blocking the automated file creation.
How can I verify if folder permissions are causing the PDF export failure?
Try manually exporting the Excel file to PDF and saving it directly to your Desktop. If this works, the original target folder likely has restricted write permissions preventing the external application from saving the file.
Does WPS Office support exporting spreadsheets to PDF?
Yes, WPS Office has robust, built-in PDF tools. You can easily export any spreadsheet to a PDF format directly from the main menu without needing third-party add-ins.
What information is needed when reporting this error to IT support?
Provide your exact Excel version and build number, your operating system, the name and version of the external application, the exact error code (2306), and specify whether the error happens on new files, existing files, or both.




