Copilot for Microsoft 365 Tech Accelerator
Feb 28 2024 07:00 AM - Feb 29 2024 10:30 AM (PST)
Microsoft Tech Community
SOLVED

Create relative paths in excel

Copper Contributor

Hello, 

I am trying to create relative paths for an excel workbook.

I am typing  ../example/example.xlsx .

The file is located on the same folder like the .xlsx file, but when i move the file and the folder to another pc, it doesn't work.

I am new to this, what am i doing wrong. Please help( forgive me if it is a stupind question)

5 Replies

@Axel_Beid 

 

It's not altogether clear HOW you're moving the file and folder to another PC, and that probably is a factor. Are you physically copying file and folder to a thumb drive, for example, and then copying them into the second PC?

 

If you're doing it via a cloud service (OneDrive or iCloud), then why are you doing it? You just access the folder and file from the new computer. I at various times use three different Macs, plus an iPhone and iPad, all with access to my folders and files on both OneDrive and iCloud -- one or the other, depending on what software, so with Excel it's always OneDrive. I have no problem accessing any given Excel file from any of those devices.

 

So could you give a more complete description of how you're accomplishing this move? It may be that you just need to go looking on the new, because even though you have used the same folder name and file name, the full path that the computer is using--its internal references--are different, one computer to the next.

@mathetes 

I am physically copying the file and folder to a thumb drive, and moving to another PC . This is because a have a large amount of data, and have multiple PC s, but can't sync the folders to onedrive( i do not know why, trying to fix this issue) but till i find a way i am strugguling with this option, and i ve come across this problem.

I created the excel file with links to multiple folders and files(there is a folder that contains everything, in that folder i have an excel file in wich i ve put links to every file and folder in the master folder) like a list, and once a week i back up that master folder to another pc, copying it to a usb external ssd and transfering it to another pc, and when i try accesing the links in the excel file, the links don't open, and i have to manually update them again.

 

Thank you, hope this was a good explanation of my situation.

 

@mathetes 

The excel file is .xlsm , i need this type because i need some macros.

Could this be the problem?

best response confirmed by Hans Vogelaar (MVP)
Solution

@Axel_Beid 

 

 I have a large amount of data, and have multiple PC s, but can't sync the folders to onedrive( i do not know why, trying to fix this issue) but till i find a way i am strugguling with this option

 

Leave aside the word "sync": are you able to simply save the file, in its folder, to OneDrive? If so, then you should be able to open it from any computer (or portable device) that also has access to your OneDrive account.

 

I am physically copying the file and folder to a thumb drive, and moving to another PC .

...

I created the excel file with links to multiple folders and files(there is a folder that contains everything, in that folder i have an excel file in wich i ve put links to every file and folder in the master folder) like a list, and once a week i back up that master folder to another pc, copying it to a usb external ssd and transfering it to another pc, and when i try accesing the links in the excel file, the links don't open, and i have to manually update them again.

 

When you physically copy files/folders/whatever to a new PC via a thumb drive, it doesn't surprise me that at all there might be an altogether different "path" assigned from the root drive, be it C: or D:, such that the links created in the former PC aren't applicable.

 

The excel file is .xlsm  ... Could this be the problem?

 

I doubt it. As noted, I think it's more a matter of a different path from the root drive being assigned in the second computer.

Are you able to find the new folder & files in the second computer? That is to say, they're present, so it's not a matter of their not being transferred over; it's just that the links you have no longer work. Assuming that's the case, especially if they're primarily backups, I wouldn't worry about it. What I would do is work to get your access to the folder and files on OneDrive cleaned up so that they're accessible from any and all of your devices.

 

If I were in your place, I'd let Microsoft and OneDrive worry about data security. Of if you don't trust them enough, keep your SSD backups, but don't worry about the internal links in a spreadsheet. So long as the files themselves are "all present and accounted for" your backup is working. Or maybe have a backup set on Microsoft's OneDrive and another in Apple's iCloud. And another in Amazon or DropBox.

Yes, the files are present , and when i copy the file in one drive it works as well, i can see it and access it from any of my devices , i will continue on trying to sync my folder with my onedrive , because it is a tidious task to have to copy the folder every week.
Thank you very much!
1 best response

Accepted Solutions
best response confirmed by Hans Vogelaar (MVP)
Solution

@Axel_Beid 

 

 I have a large amount of data, and have multiple PC s, but can't sync the folders to onedrive( i do not know why, trying to fix this issue) but till i find a way i am strugguling with this option

 

Leave aside the word "sync": are you able to simply save the file, in its folder, to OneDrive? If so, then you should be able to open it from any computer (or portable device) that also has access to your OneDrive account.

 

I am physically copying the file and folder to a thumb drive, and moving to another PC .

...

I created the excel file with links to multiple folders and files(there is a folder that contains everything, in that folder i have an excel file in wich i ve put links to every file and folder in the master folder) like a list, and once a week i back up that master folder to another pc, copying it to a usb external ssd and transfering it to another pc, and when i try accesing the links in the excel file, the links don't open, and i have to manually update them again.

 

When you physically copy files/folders/whatever to a new PC via a thumb drive, it doesn't surprise me that at all there might be an altogether different "path" assigned from the root drive, be it C: or D:, such that the links created in the former PC aren't applicable.

 

The excel file is .xlsm  ... Could this be the problem?

 

I doubt it. As noted, I think it's more a matter of a different path from the root drive being assigned in the second computer.

Are you able to find the new folder & files in the second computer? That is to say, they're present, so it's not a matter of their not being transferred over; it's just that the links you have no longer work. Assuming that's the case, especially if they're primarily backups, I wouldn't worry about it. What I would do is work to get your access to the folder and files on OneDrive cleaned up so that they're accessible from any and all of your devices.

 

If I were in your place, I'd let Microsoft and OneDrive worry about data security. Of if you don't trust them enough, keep your SSD backups, but don't worry about the internal links in a spreadsheet. So long as the files themselves are "all present and accounted for" your backup is working. Or maybe have a backup set on Microsoft's OneDrive and another in Apple's iCloud. And another in Amazon or DropBox.

View solution in original post