Error "changes could not be saved ... because of a sharing violation"

Published: 04 Jul 2014
Last Modified Date: 05 Nov 2020


When saving an Excel file to which either:
  1. Tableau Desktop is connected live, and Tableau Desktop is open OR
  2. A view on Tableau Server or Tableau Online is used which contains a live connection to the Excel file

the following error might occur:
Your changes could not be saved to '<filename>’ because of a sharing violation. Try saving to a different file.


  • Tableau Desktop
  • Tableau Server
  • Tableau Online
  • Excel (.xls, .xlsx) files
  • Live connection


Option 1: Continue to Use Native Connection (Tableau Desktop only)

Close Tableau Desktop and then save the Excel file.

Option 2: Use an Extract Connection to the Excel File

  1. Create an extract of the Excel file.
  2. Save the workbook, close and then reopen Tableau Desktop.
  3. Save changes to the Excel file, then refresh the extract in Tableau Desktop to pull in new data. For information about creating and refreshing extracts, see Extracting Data.

Option 3: Switch to Using Legacy (Jet-Based) Connection (applicable only for Tableau Desktop 10.5 and earlier)

For more information about differences between legacy and native connections and the benefits of using each, see Upgrading Data Sources.
  1. In Tableau Desktop, make a new connection to the Excel file:
    • Click Connect to Data.
    • On the Connect page, click Microsoft Excel, select the file that you want to connect to
    • Click the Open drop-down menu, and then select Open with Legacy Connection.
  2. Replace original data source with newly created data source. For more information, see Replacing Data Sources.

Option 4: Reduce the cached connection lifetime from default of 2 hours (Tableau Server only)

  1. On the computer running Tableau Server, open a command prompt as an administrator.
  2. Change directories to the Tableau Server bin directory (default is C:\Program Files\Tableau\Tableau Server\<version>\bin) and run the following commands:
    tabadmin stop
    tabadmin set protocolcachelifetime_in_minutes 60
    (or your preferred timeout in minutes).
    tabadmin config

    For details on connection timeouts, see Live Database Connection Not Closing.


Using the direct connection to an Excel file in a workbook that is open in Tableau Desktop, Tableau Server, or Tableau Online results in the Excel file becoming locked.

Did this article resolve the issue?