Excel stopped storing links with relative file path - what to do? - excel

So, in my organization we have a shared drive with a number of Excel workbooks that link to each other. For years, this have worked according to Microsofts description here:
https://support.microsoft.com/en-us/topic/description-of-workbook-link-management-and-storage-in-excel-46628e8d-2cd6-db5f-3474-f8d7144b09d6
About a year ago, without any change from our side, all our links started behaving as absolute references instead of relative. This is a huge problem for us since it means we can't copy a folder with it's subfolders and have the files still link to each other. (For example, we want to take a structure of files and try out how a new scenario would affect them, or we want a copy of the structure but for a new time period.)
Does anyone know what might cause this problem?
Is there anything we can do to have the links stored as relative again?
I can't believe we're the only ones experiencing this, but I haven't been able to find anything on this problem this far.

Related

Office / Excel 365 - use relative hyperlinks instead of OneDrive

I asked this question on Microsoft TechNet 2 weeks ago but have not received any answer. (https://techcommunity.microsoft.com/t5/excel/office-excel-365-use-relative-hyperlinks-instead-of-onedrive/m-p/3068778)
I've recently been "upgraded" to M365 on my work computer, and it's been .... interesting.... There's a lot of changes, a lot of things have moved around. I'm getting used to it, and finding out how to solve things that are new/bugging me. However, I'm yet to find a solution to relative hyperlinks.
I have one Excel Workbook which is my index/summary of a bunch of other spreadsheets/docs. (An example, I have plenty of books with these links!) The index doc shows me where the other information is stored and its status. I want to hyperlink to each of the child spreadsheets/documents, which are in sub-folders of the folder my index workbook is in. E.g. there is one spreadsheet holding the data for each date. Previously, this would just link to "\2022-01-21\dailydata.xlsx". If it was in a parallel folder, it would link to "..\otherProject\docs\mydoc.docx".
Now I'm on M365 and OneDrive, EVERYTHING is linked to the online address for the OneDrive doc, e.g. a link to a file in the same folder as the spreadsheet I'm working on, instead of being "TheOtherSheet.xlsx", is instead linked to "https://my-company.sharepoint.com/personal/my_name_and_company/Documents/Documents/Customers/This%20Customer/This%20Project/Issue%20Tracker/Issue%2001/Data/TheOtherSheet.xlsx"...!!!
Opening old files with relative hyperlinks converts the links to the online target.
Yes, the links still work and open the local file when I'm offline (critical!). However, it doesn't make any sense, and it makes the links harder to quickly check / understand visually. I haven't tested what would happen if I were to move a project folder containing relative references to sub-folders; I'm assuming that OneDrive will fix the links...? Sort of afraid to try.
Is there any way to get the old style relative hyperlinks back?
Update: I've just discovered that when I click on one of these hyperlinks to a file on my PC, it downloads it from the cloud, creating a new file in my downloads folder instead of opening the bloody file on my PC!!!! It also takes me to the SharePoint version of linked folders instead of going to the folder!
For me the following works:
Configure OneDrive to turn OFF "Use Office application to sync Office files" in OneDrive Settings / Office

PowerBI: Importing data from mixed folder files

I got a question related to the importing different files from the folder into Power Query (Power BI). When I say different, in my case are .xslx and .txt files. Actually just one text file but it is important to be inside report. Excel files are and will be always consistent as it is shown down in a first picture only with date as a dynamic part, but inside are consistently structured, so I just have to put it into folder and hit refresh into Power Query and magic.. that works fine, but I got also that .txt file which has completely different information but still connected to the report (because there is a field of date/time inside with additional information). My question is how or what is good approach to have all these files inside one or more queries?
As you can see on the second picture (from PQ editor) in the content part on the last position is .txt file, which I "isolated" when right click on it and "Add as a new query", and then I need to do editing and so on. Is there maybe another approach to solve this? One problem I discovered is when I change path of the file, all queries are refreshed but not this one with .txt - even though I changed path completely in the Advanced editor. Simply gives an error. Has anyone idea how to deal with different files from one folder, assuming that you need all the files from inside?
If you do not want 2 folders, your approach for isolating the txt is appropriate. about refreshing issues: if you expanded the data by clicking combine, Excel must have created other queries and parameters ("Sample from....") you must change the path in those queries too.

How to reference or link files and folders inside a git repository to match these criteria?

I've encountered a problem long time ago which I couldn't solve, but I'm curious whether it's possible to fulfill ALL of the below listed criteria at once or not.
The solution what I was looking for can:
somehow refer to an existing file or folder from another folder of the same git repo
basically reach the content of the file or folder from another subfolder, see the content(s) as if they were on the another path as well
e.g.: if ./path/to/folder is referred from ./another_path/different_folder, then every file in ./path/to/folder/* is visible on path ./another_path/different_folder/*
e.g.: if ./path/to/file is referred by ./another_path/different_file, then by reading/writing content of the different_file, the original file is read/modified
store the referred file only once in git repo
don't want to make a copy of the file to another path and maintain changes in both files simultaneously
be able to use multiple references for a single file
be able to use relative paths
make it work on both Windows and Linux
As if I can remember, some of the problems were while experimenting with this:
the paths were broken after the repository was pulled to a different path (I assume they were not relative, but absolute)
the Windows style links are special files, were not working on Linux
the symlinks can't handle relative paths correctly on the Windows system
the hardlinks resulted duplicating files in Windows
(I can't remember exactly which if these might be incorrect, but I'll experiment with the problem again and try to update this question.)
Is there any workaround for this problem?
Thank you for any help!
Please note (in case you would like to mark this question as a duplicate), that there are other similar questions here, but none of those questions define this set of the criteria, therefore it can't be a duplicate.

How to store macros in one file shared among several users? (not PERSONAL.xls)

I have a 20 excel files with Automation written in VBA where the workflow is similar but there is some customizations in each of the files. I would like to have 20 files, each file per task, but I would like to put all macros into one file, with all the customizations. This will simplify fixing/changing the automation.
I want to have basically one file GlobalMacros.xls somewhere in a shared drive which contains all the modules that do not contain customizations, and only have references to it in the proper files.
Personal.xls is not an answer as I do not want users/team members to feel the changes at all.
Please tell me if there is a solution and what are downsides.
Solution 1:
My solution is to make the module in GlobalMacro.xls and then add just a reference to the module in each file. The downside is it could slow down the execution of the macros because the GlobalMacros.xls will be opened and closed in the background each time any module is called out. Also is it possible for several users using these macros at the same time?
Has anyone got any better solutions? Maybe someone had a similar problem in the past.
I'll go into a bit more detail about how to use XLAM files properly.
In a network environment, you will want to keep a local copy of the XLAM where you make changes and updates, and once all glitches are worked out, you then copy it to the server where everyone else accesses it. You will want to also make the server copy read-only, which must be reset each time you copy the file to the server. If you dont make it read-only, you will not be able to copy the updated file to the server while anyone has Excel currently open.
In addition, when the users add the Add-On to their Excel, they will be prompted to copy the XLAM file to their local computer, to which they should reply No, as they want to be able to run off the server copy so they can get your updates. I have found that most people instinctively think they should answer Yes to that question.
If they end up answering Yes, then the only way to fix it is to edit thier registry and remove the reference, and then re-add the Add-On.

Win8.1 Refresh deleted my folder on desktop

I just restarted my laptop today because it was saying there was problem with one of the disks and it needed to restart to fix it, so I restarted it. But when it was booting it came across to a problem and was not able to boot and showed me some options. So under "refresh" it was saying it won't delete any files but it may delete apps, which was fine for me so I chose this and waited about 15-20mins to do the job.
Once it was done windows started normally and I got my old desktop with old names of my files. Everything was fine except I was not able to find the folder I have been working on for the last two months (which I did not backup stupidly, though I intended a few times but was lazy and I had no worry about losing the data). The folder was just at the middle of my desktop with the name "equation derivation". I can not freaking find it. All of my other folders are here but not THE ONE that is supposed to be. I am just freaking out here.... I had many matlab codes and PDF files inside this folder.
I tried to restore but there is no restore point because of freaking "refresh".
I tried to use a recovery program to show me some files, but it found almost nothing.
There is a "windows.old" file which has user accounts but in that one there are fiveusers: Administrator, guest, ibaha_000, Public, UpdatusUser. Last three folder's creation date is today and first two folders creation date is when I bought the laptop (2014-HP-Envy) . When I go inside ibaha_000 folder (or any others) there are some folders inside it and I try to go inside "Desktop" because the folder I am trying to find was on desktop, but there is nothing there at all. So "windows.old" did not restore any of my files....
When I search for any of the matlab file names or folder names or PDF file names on the search of PC, I get no result.
Please someone help me with this I really need someone's help to recover my files that I spent two months... (And I know I should have backed it up but there was no sign of anything like this I would have, stupid me...)
Thank you very much!
I was able to recover my files from the hard-disk with professional "active at" recovery program that ran about 8 hours to pull out data.
Refresh might delete your files because it might recognize some of your programs or text files as windows program files, as it happened in my case. It didn't delete all of my matlab files, it deleted the folder I have lots of .m files.
So before refreshing windows, BACKUP your data, that's the solution.

Resources