Excel Hyperlinks to Excel documents not working - excel

We have a excel document that contains a ton of Hyperlinks to other Excel Documents & File Paths all located on our network. All of a sudden the Hyperlinks to the Excel Documents have broken, Excel will state the error below;
Some files can contain viruses or otherwise be harmful to your computer. It is important to be certain that this file is from a trustworthy source.
Would you like to open this file? OK/Cancel
We click OK and nothing will happen. Opening file paths is still working fine and I've created another Excel document which has links to a PDF, a File Path, a Word Doc & an Excel Doc. Still only the Excel that isn't working.
I have followed several articles online that suggest how to disable the warning message,below is a well detailed article for 2007/2010 but we had tried to adapt it for 2013/6. Nothing I have tried is working, does anyone on Stack have any suggestions?
https://support.microsoft.com/en-gb/help/925757/how-to-enable-or-disable-hyperlink-warning-messages-in-2007-office-pro
We are using Office 2013/6 Standard/Professional.
Any help would be greatly appreciated!!
Many thanks,
Sean

This happens when you copy the excel file to different location:
You can do test: place hyperlink into 1 cell save it, and then copy the file to another location: you can see that hyperlink of your copied excel file would not work.
However when you choose the same file to "Save As": the hyperlink of the saved file in different location will work.
For excel internal hyperlinks (hyperlinks to other worksheet cells) similar thing happens when you rename the file: hyperlinks won't work, but they will work if you choose to "Save As".
This means, the solution to this problem would be: copy the excel file to it's original location and name it with the original name (when hyperlinks were working). In this case hyperlinks will work. Then if you need to move or rename the file: open the file from original location and select "Save AS" anywhere you would like to save, in this case hyperlinks of your saved file would work.
Conclusion: relative references to the Excel file in hyperlinks are not automatically updated when externally file is moved or renamed.

So we managed to find out what was the cause of this problem.
Microsoft are currently working on fixing this as stated in the article below, but as a quick fix you simply need to remove Windows Update KB4011051.
https://support.office.com/en-gb/article/Hyperlinks-to-another-Excel-workbook-no-longer-work-after-updating-to-the-August-1-2017-update-KB-4011051-dfe0aa5c-a2ba-41b8-923a-fe0e4556f936
Thanks for the assistance,
Sean

Related

View removed VBA code after repair of Excel file

I am getting an error when opening excel: We found a problem with some content in XXX. Do you want us to try and recover as much as we can? if you trust he source of this workbook, click Yes."
clicking Yes, "fixes" the issue but deletes a lot of VBA code, two weeks worth.
Whatever the issue it was introduced yesterday, I do not want to redo two weeks worth of coding. Is there anyway I can view what was removed, or open the VBA in notepad++ or something without opening the excel?
I opened another excel workbook and tried all the different options for the argument XlCorruptLoad in the Workbooks.Open to open the corrupt workbook. I noticed that there were two non existing sheets created in the project explroer of the corrupt workbook that had the code in there. I am not sure if it did that s a result of what I did or it was there all along and I did not notice it
Note that the reason I had a corrupted data is because the code was extracting a list and putting it in a cell validation formula..i guess I overloaded it.

Cell references/formulas in Excel to other workbooks on Sharepoint don't update values

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
Setting “Calculation” to “Automatic.
Click “Calculate Now” and “Calculate Sheet”.
Double-click into the cell with the reference and hit enter.
In “Data > Queries & Connections” click “Refresh all”
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.
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.
My workaround would be to consolidate external links onto a single sheet, and manually or use a macro to copy / hard paste to another identical page that you use for the links.
Just run the macro when you have the workbook open on your desktop to update the values.
Even simpler, you could also have a sort of database with linked values in a column and hard copies pasted into another column. This would be simpler than two identically sized sheets.
BUT, you could also go crazy and have named ranges like quarterly_total_formula and an analogue somewhere else called quarterly_total_valueonly and then write a macro to iterate over each with a for each looking for things "LIKE" *_formula and hard paste each result into the complementary *_valueonly spot... but then you'd need a macro to check that they were all paired... and by that point you might as well not waste your time in Excel and develop in Power BI, Tableau, RMarkdown, or heck learn Adobe Illustrator or work directly in HTML.

Macro-Enabled Template keeps opening original document when macro is run

I made a series of macros on a document called 'Prac.xlsm'. I then saved the document as a Macro-Enabled template. When I run the first macro in the template it works but it also opens my original document titled Prac. The macro doesn't do anything to that original document though.
I tried to step through the templates macro and that works without opening up the original.
I then tried renaming the original file which resulted in an Excel popup saying "Sorry, we couldn't find ..file path & name for the Prac file.. Is it possible it was moved, renamed or deleted?" I can't see anywhere in the code where it refers to the file name Prac.xlsm. And because stepping through the code works without opening up the original file it has me stumped.
Any help would be appreciated.
Thank you.
Discovered it was because I was accessing the macros from the ribbon as I customized it. Unsure why but if I trigger the macros from the Developer tab they work.

Excel Connections - Edit Links Not Working?

I do not know if this has been asked elsewhere but I looked and googled around for 30 mins and couldn't seem to find much. I have an old file with some drop down boxes for certain cells in an excel spreadsheet. I never really know how it works to be honest, and there are no macros within this sheet. But somehow, there are some links between some cells within the same file.
I recently changed file names and made copies to this master file, but some of the newer copies drop down boxes no longer work, and seems to be wanting to get to the original file. I tried editing this/these link(s) under the ribbon interface using 2016 - Data > Edit Links (under connections), and it brings up a pretty dialogue box, which has this change source button. But after I clicked it and selected the correct file (it's a circular reference, so it is the current file), it simply did nothing and did not update the file name or anything else shown within the dialogue box. And of course, my links are not fixed and the drop down boxes are not working.
I have uploaded the file here with all data stripped out, but the links are still intact there for your review. Any suggestions why I am seeing this? If I want to fix the links, what can I do to achieve that without fixing each of the cells individually? Thanks!
The file is here:
https://drive.google.com/open?id=1Sn27jnQmYvqWHho6Oa0yz7PXVGU4zwPJ
These reason you're seeing these links is that there are cells with Data Validation that point to an external file (cell B71, for example).
Remove all Data Validation that is referencing external files, save the file, and re-open. The links should be gone.

Find Missing External Links in Excel

My spreadsheet has external links that I cannot find. It pops up the "workbook contains links to other data sources" warning upon opening. I don't want to just suppress the link warning, I need to remove the links.
I've tried all the basic ways to find external links that I'm aware of, and it's still happening. I've tried:
Searching for "[" in formulas in the entire workbook
Charts
Checking the named ranges from the Formulas/Name Manager menu
Checking objects
Conditional formatting menus
Is there another way to find external links? Thanks.
It can come from several sources. In my case, it came from the formula of a rule in the conditionnnal formatting. And no Excel search tool could find it.
In the case of an xlsx file, you can find it with an automatical approach:
In the Data tab, click on Edit links. All your links should be displayed. Mark down the values of the Location fields.
Unzip the xlsx file. Technically, an xlsx file is a zip container. See this post for more information.
Now search the whole directory for the Location strings.
Figure out to what your links are related. In my case, it was inside a x14:conditionalFormatting xml node. No wonder the Search tool did not work, it was not in a cell.
Modify that formula
Game over.
I would check the names collection in your workbook.
If you have a named range, for example, that has links to another workbook this will do this also... You can examine these in Excels Name Manager, or some VBA code executed in the debug window...like:
for i = 1 to names.Count: debug.Print Names(i): Next
I had an Excel 2013 file that whenever opened displayed a message regarding a missing external link. I could not find such a link (and location in file) using many suggestions and tools (Kutools, FormulaDEsk etc.).
Finally, I changed the file from xlsx to zip, opned and searched and deleted the gokder relating ton External Links (and changed back). Problem solved!

Resources