Automatically Back Up an Excel Workbook to a Network Drive
Question details
Create routine backup copies of a cloud-based Excel workbook in a separate network location.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- The workbook is maintained in the cloud, but backup copies are also needed on a network drive.
- Observed behavior
- Excel's standard backup option generally creates a backup in the same folder rather than a separate network destination.
For the scheduled Windows method, sync the workbook to your computer with OneDrive and confirm that the latest version is available locally. Check that your Windows account can write to the network folder, and note the workbook's local path and the folder's UNC path.
Schedule a network backup with PowerShell and Task Scheduler
Use this method on Windows to copy the locally synced workbook to a network folder on a schedule.
The backup copies the most recently synced local version, so it may not include cloud changes that have not yet reached the computer. Keep the computer running and OneDrive signed in and syncing when the task runs.
In File Explorer, find the workbook in your synced OneDrive or SharePoint folder, right-click it, and select Always keep on this device. Confirm that OneDrive has finished syncing.
Create a folder such as C:\Scripts, then use Notepad to save the following as C:\Scripts\Backup-Workbook.ps1. Replace the source and destination paths with your own: $source = 'C:\Users\YourName\OneDrive\Workbook.xlsx' $destination = '\\Server\Share\Backups' $name = 'Workbook_{0}.xlsx' -f (Get-Date -Format 'yyyyMMdd_HHmmss') Copy-Item -LiteralPath $source -Destination (Join-Path $destination $name) -ErrorAction Stop
Open PowerShell and run & 'C:\Scripts\Backup-Workbook.ps1'. In File Explorer, open the network folder and confirm that a timestamped copy was created and opens correctly.
Open Windows Task Scheduler and select Create Basic Task. Choose a schedule, select Start a program, enter powershell.exe as the program, and enter -NoProfile -File "C:\Scripts\Backup-Workbook.ps1" as the arguments.
In Task Scheduler, select the task and click Run, then check Last Run Result and the network folder. Choose a retention period and periodically remove older copies from the backup folder.

Save a manual copy to the network folder
Use this option when you need an immediate copy but cannot set up a scheduled task.
Edit a synced workbook in WPS Spreadsheets and schedule network copies
Use WPS Spreadsheets to edit the locally synced Excel workbook, then use Windows Task Scheduler and the PowerShell script above to create network backup copies. The scheduling is performed by Windows, not WPS.
- 1. Open the synced workbook: In WPS Spreadsheets, select Open and browse to the workbook in your local OneDrive or synced SharePoint folder.
- 2. Save your changes: Edit the workbook and select Save. Confirm that it remains in XLSX format and that the sync client has finished syncing.
- 3. Schedule the copy: Create the PowerShell script described above using the synced workbook path and network folder, then add it as a scheduled task in Windows Task Scheduler.
- 4. Check the backup: Run the task from Task Scheduler, then open the timestamped copy from the network folder in WPS Spreadsheets to verify it.

Frequently Asked Questions
Does Excel's Always Create Backup option let me choose a network folder?
It generally creates the backup in the same folder as the workbook rather than a separate destination. Use a scheduled copy or save a separate copy to the network folder instead.
Will the scheduled backup include unsaved or unsynced changes?
No. The script copies the local file as it exists when the task runs. Save changes in the spreadsheet app and check the OneDrive sync status before the scheduled backup.
Why did the scheduled task fail to reach the network folder?
Check the task's Last Run Result in Task Scheduler and confirm that its account can access the UNC path and write to the folder. Mapped drive letters may not be available to scheduled tasks.
Can I use Power Automate instead of a Windows script?
Yes. A Power Automate flow may be able to copy a OneDrive or SharePoint file to a network folder using the File System connector and an on-premises data gateway. Availability, licensing, and administrator configuration depend on your organization.




