You can set registry entries to allow x64 to load x32 libraries.
So COM ignores bitness in EXE files. So any EXE file can be loaded by any COM client (and vice versa though no one cares). By setting registry entries you force your DLL into DLLHOST.exe.
COM loads a 64 bit stub into Excel and communicates to the stub. As far as Excel can tell it has loaded a 64 bit dll.
One problem is that one registry key you don't have permission to change. You must take ownership and give yourself permission to add an entry. There is no inbuilt tool to do this automatically, unlike for files.
This following reg file enables the MSScript Control, which allows you to execute VBScript and JScript as macro languages. Microsoft wants to kill VBScript and JScript and MS Script Control. So it is only available as a 32 bit dll for compatibility. It takes under a minute to add macro languages to any program. Contrast to VBA which you have to pay to use. Note the one line that requires TakeOwnership.
Windows Registry Editor Version 5.00
;MSScript.reg
[HKEY_CURRENT_USER\SOFTWARE\Classes\CLSID\{0E59F1D5-1FBE-11D0-8FF2-00A0D10038BC}]
@="ScriptControl Object"
"AppID"="{0E59F1D5-1FBE-11D0-8FF2-00A0D10038BC}"
[HKEY_CURRENT_USER\SOFTWARE\Classes\Wow6432Node\CLSID\{0E59F1D5-1FBE-11D0-8FF2-00A0D10038BC}]
@="ScriptControl Object"
"AppID"="{0E59F1D5-1FBE-11D0-8FF2-00A0D10038BC}"
;This one needs to be done manually
[HKEY_CURRENT_USER\SOFTWARE\Classes\Wow6432Node\AppID\{0E59F1D5-1FBE-11D0-8FF2-00A0D10038BC}]
"DllSurrogate"=""
[HKEY_CURRENT_USER\SOFTWARE\Classes\AppID\{0E59F1D5-1FBE-11D0-8FF2-00A0D10038BC}]
"DllSurrogate"=""
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{0E59F1D5-1FBE-11D0-8FF2-00A0D10038BC}]
@="ScriptControl Object"
"AppID"="{0E59F1D5-1FBE-11D0-8FF2-00A0D10038BC}"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Wow6432Node\CLSID\{0E59F1D5-1FBE-11D0-8FF2-00A0D10038BC}]
@="ScriptControl Object"
"AppID"="{0E59F1D5-1FBE-11D0-8FF2-00A0D10038BC}"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Wow6432Node\AppID\{0E59F1D5-1FBE-11D0-8FF2-00A0D10038BC}]
"DllSurrogate"=""
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AppID\{0E59F1D5-1FBE-11D0-8FF2-00A0D10038BC}]
"DllSurrogate"=""
The reference is here but only DLLSurrogate is of interest to you - https://learn.microsoft.com/en-us/windows/win32/com/appid-key.
A more of a background reference - https://learn.microsoft.com/en-us/windows/win32/winprog64/process-interoperability.