1
votes

The problem

I have eight Excel documents that are stored on a Sharepoint site. One of those documents (“receiving file”) contains formulas/cell references to the other seven documents (“source files”) on Sharepoint.

Everything works when the references are created.

Once the workbooks are saved and closed and then reopened, the receiving file no longer updates the values from the source files.

The files are synced in Windows Explorer and opened in the desktop version of Excel. Also, all eight files are opened at the same time.

The reference will first look something like this

='[Source file.xlsx]Sheet1'!$A$1

After closing and reopening, the references will look like this

='https://somecompanyname.sharepoint.com/sites/SitefortestingExcelreferences/Shared Documents/[Source file.xlsx]Sheet1'!$A$1

If I now change a value in the source value, the change will not appear in the receiving file.

What I tried so far

  1. Setting “Calculation” to “Automatic.
  2. Click “Calculate Now” and “Calculate Sheet”.
  3. Double-click into the cell with the reference and hit enter.
  4. In “Data > Queries & Connections” click “Refresh all”
  5. In “Data > Queries & Connections > Edit Link” I clicked on update values. It did not help. However, I tried to rebuild a simple system with just two files and a single reference, and here it did work

Starting from point 5) I programmed a little macro that updates all links in all open workbooks (it did not help either):

Option Explicit

Sub UpdateAllConnections()

    Dim wbWorkbook As Workbook
    
    For Each wbWorkbook In Application.Workbooks
        wbWorkbook.UpdateLink Name:=wbWorkbook.LinkSources, Type:=xlExcelLinks
    Next wbWorkbook
    
    MsgBox "Update complete.", vbInformation, "Complete"
End Sub

If I remove the path to SharePoint, so the formula looks like this

='[Source file.xlsx]Sheet1'!$A$1

It works again (until I save and reopen).

I found the following on Microsoft Answers (about OneDrive but it's probably the same issue):

https://answers.microsoft.com/en-us/msoffice/forum/all/excel-value-links-not-updating-on-onedrive/e48a7680-71e6-4a77-9eb1-e03ec7f0e3e0

I contacted the official O365 support desk and they told me this is built into the connection between Excel and OneDrive.
They have received thousands of complaints and there is no fix for it.
No option to tell Excel/Office/OneDrive to link to local copies of files on 1D by default.
No fix is planned as this is not how MS envisions how Excel/1D should be used.

My question

Any suggestions? Are there any tools in Excel that can be used to update the linked cells automatically or manually? Might SharePoint settings prevent the update?

If not, since removing the file path to SharePoint seems to work is there a way (using VBA) to remove the full file path from all cell references, so

='https://somecompanyname.sharepoint.com/sites/SitefortestingExcelreferences/Shared Documents/[Source file.xlsx]Sheet1'!$A$1

becomes

='[Source file.xlsx]Sheet1'!$A$1

I could probably loop through all cells and simply replace the path with nothing, but that would only work if I know the file path beforehand and if all the files are stored in the same SharePoint folder.

1

1 Answers

0
votes

I had the same issue and here is my workaround: I can open the source file on the Sharepoint site by clicking ... and then Open in App (as opposed to Open in Browser) The referecence cell in the receiving file will become ='[Source file.xlsx]Sheet1'!$A$1 again and get automatically updated.