This would appear to be an Excel bug, since your image shows that you can successfully see the folder using the explorer.
https://answers.microsoft.com/en-us/msoffice/forum/all/excel-365-cannot-open-the-file-because-the-file/c3394950-4aa3-433a-bbe4-cdb0c02a32bc
You have this tagged with only "Windows 11". I would recommend that you add the tags for Office/Excel to reach users who are more familiar with those technologies.
One thought that I had would be use the 8.3 name when opening the file. I was unable to find a simple way to do that so I put together this Powershell script to build it.
# https://stackoverflow.com/questions/16995359/get-childitem-equivalent-of-dir-x
# https://devblogs.microsoft.com/scripting/use-powershell-to-display-short-file-and-folder-names/
# 8.3 https://michlstechblog.info/blog/windows-enable-generation-of-8-3-names/
Param([string] $path ="")
$MethodDefinition = @'
[DllImport("kernel32.dll", CharSet = CharSet.Unicode, EntryPoint = "GetShortPathNameW", SetLastError = true)]
public static extern int GetShortPathName(string pathName, System.Text.StringBuilder shortName, int cbShortName);
'@
$Kernel32 = Add-Type -MemberDefinition $MethodDefinition -Name 'Kernel32' -Namespace 'Win32' -PassThru
$shortPath = New-Object System.Text.StringBuilder(500)
if ($path -eq "") {
$path = read-host "Paste in the path name..." #'c:\Program Files\common files\DynamicAppDownloader\downloads'
}
if ($path -eq "") {
"Path cannot be null."
Start-Sleep -Seconds 5
return
}
"Path is $path."
if ((test-path $path) -eq $false) {
"Path not found."
Start-Sleep -Seconds 5
return
}
$retVal = $Kernel32::GetShortPathName($path, $shortPath, $shortPath.Capacity)
$short = $shortPath.ToString()
"Short name is $short"
"...and has been copied to the clipboard."
$short | Set-Clipboard
if (((Get-Process -id $pid).StartTime) -gt ((Get-Date).AddSeconds(-10)) ) {
Read-Host "Press enter to exit."
}
Edit: I found a better way to code the script.
It will convert a name like "C:\Program Files\Common Files\DynamicAppDownloader\Downloads" to it's 8.3 name, "C:\PROGRA~1\COMMON~1\DYNAMI~1\DOWNLO~1". As long as your file system is saving the 8.3 names, that is.
Save that as a .ps1 file. Using the Windows explorer, copy the full path to the clipboard. Run the script and paste in the name when prompted. It will save the short name into the clipboard.
Then launch Excel and do the file/open dialog. Paste in the short (8.3) path and see if it will open. (I don't have Excel.)
Another option would be to create a symbolic link that points to some folder that is way down the list of subfolders.
Here I created a link named Finance to point to some other folder.
C:\Temp>mklink /d Finance "C:\Program Files\Common Files\DynamicAppDownloader\"
symbolic link created for Finance <<===>> C:\Program Files\Common Files\DynamicAppDownloader\
C:\Temp>cd Finance
C:\Temp\Finance>dir
Volume in drive C is OS
Volume Serial Number is 36C0-6121
Directory of C:\Temp\Finance
01/20/2022 09:03 PM <DIR> .
11/03/2023 10:53 AM <DIR> ..
01/20/2022 09:03 PM <DIR> Downloads
0 File(s) 0 bytes
3 Dir(s) 503,619,686,400 bytes free
C:\Temp\Finance>
I don't know if that would interfere with Dropbox or not. You could create a folder, say C:\DBData, and then use mklink to create links to subfolders where the normal path is too long, by using DBData that lets it have a shorter name.