Welcome to the Alteryx Knowledge Base
Created/Edited -
An Output Data tool fails when writing to an Excel workbook because Alteryx cannot create or replace the temporary backup (.bak) file required during the write operation:
Unable to create backup of XXX.xlsx to XXX.xlsx.bak: Access is denied. (5)
When running a workflow that writes to an Excel (.xlsx) file, the workflow fails with the following error:
Unable to create backup of XXX.xlsx to XXX.xlsx.bak: Access is denied. (5)
- Alteryx Designer
- Alteryx Server
- Output Data Tool
- Excel XLSX output
- All supported versions
- Permission to write, rename, and delete files in the target output directory
- Access to the target local, network, or cloud-synced storage location
- Excel workbook is accessible from the machine running the workflow
This error occurs when Alteryx cannot create or replace the temporary backup (.bak) file used during Excel output operations.
Common causes include:
- The Excel workbook is currently open in Excel or another application
- The output file is stored in a OneDrive, SharePoint, or cloud-synced directory that temporarily locks the file
- The Run As user or workflow user lacks sufficient permissions to modify files in the output directory
- Multiple Output Data tools attempt to write to the same workbook simultaneously
- The target network or UNC path is unavailable or intermittently inaccessible
- Another process such as antivirus or file indexing software is locking the file
Try the following troubleshooting steps:
1. Confirm the Excel workbook is closed before running the workflow
2. Test writing the output to a local folder
Example local output path:
C:\Temp
If the workflow succeeds locally, next step is to review the permissions, cloud-sync locking, or network path availability.
3. Confirm the workflow user has sufficient permissions to the target output directory
The user should be able to:
• create files
• rename files
• modify files
• delete files
4. If running on Server, confirm the Run As user has access to the target output location
5. Avoid writing to cloud-synced folders such as OneDrive or SharePoint when possible
6. If writing to multiple tabs in the same workbook, avoid simultaneous writes to the same Excel file
7. Confirm the target network or UNC path is accessible from the machine running the workflow
8. Temporarily disable antivirus or file indexing software if it may be locking the workbook
- During Excel output operations, Alteryx creates a temporary backup (.bak) file before replacing the original workbook. If Alteryx cannot create, rename, or delete this backup file, the workflow may fail with an access denied error.
- This issue commonly occurs in cloud-synced directories, shared network locations, or when the workbook is already open in another application.
- This behavior may also occur when multiple workflows or processes attempt to update the same Excel workbook simultaneously.