I have three computers. All are running Windows 7. The first computer is running Windows 7 32-bit with 32-bit Office 2010. The second computer is running Windows 7 64-bit with 64-bit Office 2010. The third computer is running Windows 7 64-bit with Office 2013 64-bit installed.
Both of the 64-bit computers cannot get the ExcelPython "reference" to work. However, the 32-bit computer works just fine and on the 1st try. The command I'm testing with is ?PyStr(PyEval("1+2")). I get 3 as output on the 32-bit machine. On both 64-bit machines I get a popup that says, "File not found: ExcelPython27.dll." I am very sad.
I have tried the 64-bit version of Python 2.7.6 and the 32-bit version of Python 2.7.6 on the 64-bit computer with Office 2013 (64-bit); those did not work. I have tried copying the ExcelPython27.dll and the Python27.dll (32-bit) to the "C:\Program Files\Microsoft Office\Office15" directory; that did not work.
I have tried copying the ExcelPython27.dll to the "C:\Program Files\Microsoft Office\Office14" on the other 64-bit computer; that did not work.
Does ExcelPython work for 64-bit Office? Should I just stop trying? Any information would be a great help.
Thank you,
Mad Tom Vane
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
in principle it does work, but you would need to compile a 64-bit version of ExcelPython from source in order to use it in 64-bit Excel. I have been meaning to do this and make the 64-bit binaries available on Sourceforge but I haven't got round to it yet, I'll try to do it next week.
Thanks very much for your interest in my project, I'll notify you when the 64-bit binaries are up!
Regards,
Eric
Last edit: Eric Reynolds 2013-12-30
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the reply. I have an end user that would be happy to get the 64-bit version working on their computer. Would the 64-bit version require Python 64-bit or 32-bit? Again, thank you for such a fast response.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, in general 32- and 64-bit binaries cannot coexist within the same process (to my knowledge), so Excel, ExcelPython and Python need to be either all 64-bit or all 32-bit. This is because ExcelPython does everything in the Excel process - the alternative would be to have a separate process as a Python server which which Excel communicates, in which case you could mix and match (some other Excel/Python interfaces work this way I believe).
I will get the binaries up when I can, please DO bug me repeatedly as I might forget.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
so I had a go today at compiling the 64-bit DLL. I have no way of testing it unfortunately as I don't have a 64-bit machine, however if you could oblige that would be great.
I haven't packaged it up yet in an installer, but if you install the 32-bit version then place the attached 64-bit version of ExcelPython.dll in C:\Windows\System32 (not in C:\Windows\SysWOW64 which, confusingly, is where 32-bit DLLs are placed), it will hopefully work.
This is the first time I've compiled anything for 64-bit, and like I said, I'm doing everything blind with no 64-bit machine, so your help is very much appreciated.
Yes, it did work for me. I had Python 2.7.6 (64-bit) installed. I had the ExcelPython1.0.0 installed. I downloaded the 64-bit dll you gave me and placed it in C:\Windows\System32. I proceeded to open Excel 2013 (64-bit) and pressed Alt+F11. Next, I went to Tools -> References and added ExcelPython27. Finally, I pressed Ctrl+G and typed ?PyStr(PyEval("1+2")) in the box and pressed enter. It worked.
Ok, that's helpful. I have 64-bit windows, 64-bit Anaconda, and 32-bit excel. It sounds like I should dump Anaconda and move to the 32-bit version then use 32-bit ExcelPython since 64-bit Excel isn't easily available.
Is there another solution allowing me to work with 64-bit Anaconda & 32-bit Excel?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am afraid I don't have a solution for you. 64-bit and 32-bit code cannot
exist in the same process so the only way for 64-bit python and 32-bit
excel to co-exist is for them to have two separate processes and interact
via remote procedure calls over TCP. I believe this is how some
alternatives to ExcelPython, like xlloop, are structured. Or, actually,
what you could look into is hosting a COM server from Python and calling it
from VBA.
If you really want to use ExcelPython in this way, you need ExcelPython to
load up 32-bit python, which could then communicate with a 64-bit python
server using something like the interprocess module. But it's horribly
complicated, I wouldn't recommend it.
Maybe in future I or someone else could look into extending ExcelPython to
support remotely hosted processes.
Hi, is it possible that the 64-bit installer isn't actually installing the 64-bit dll?
J've tried several time, but it ends up to copy the ExcelPython27.dll in the SysWOW64 folder.
I've manually in the system32 folder the dll attached in this discussion and it worked well, but as I need to share my code with other, would be easier if they have just to run the 64-bit installer.
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, there was indeed a mistake, it needed an extra setting
ArchitecturesInstallIn64BitMode=x64
in the file setup.excel64.iss.
The new releases on GitHub will contain this bug fix, in the mean time I have recompiled the installer and attached it, let me know if it works OK now!
Dear ExcelPython General Discussion,
I have three computers. All are running Windows 7. The first computer is running Windows 7 32-bit with 32-bit Office 2010. The second computer is running Windows 7 64-bit with 64-bit Office 2010. The third computer is running Windows 7 64-bit with Office 2013 64-bit installed.
Both of the 64-bit computers cannot get the ExcelPython "reference" to work. However, the 32-bit computer works just fine and on the 1st try. The command I'm testing with is ?PyStr(PyEval("1+2")). I get 3 as output on the 32-bit machine. On both 64-bit machines I get a popup that says, "File not found: ExcelPython27.dll." I am very sad.
I have tried the 64-bit version of Python 2.7.6 and the 32-bit version of Python 2.7.6 on the 64-bit computer with Office 2013 (64-bit); those did not work. I have tried copying the ExcelPython27.dll and the Python27.dll (32-bit) to the "C:\Program Files\Microsoft Office\Office15" directory; that did not work.
I have tried copying the ExcelPython27.dll to the "C:\Program Files\Microsoft Office\Office14" on the other 64-bit computer; that did not work.
Does ExcelPython work for 64-bit Office? Should I just stop trying? Any information would be a great help.
Thank you,
Mad Tom Vane
Hi Mad Tom,
in principle it does work, but you would need to compile a 64-bit version of ExcelPython from source in order to use it in 64-bit Excel. I have been meaning to do this and make the 64-bit binaries available on Sourceforge but I haven't got round to it yet, I'll try to do it next week.
Thanks very much for your interest in my project, I'll notify you when the 64-bit binaries are up!
Regards,
Eric
Last edit: Eric Reynolds 2013-12-30
Thanks for the reply. I have an end user that would be happy to get the 64-bit version working on their computer. Would the 64-bit version require Python 64-bit or 32-bit? Again, thank you for such a fast response.
Yes, in general 32- and 64-bit binaries cannot coexist within the same process (to my knowledge), so Excel, ExcelPython and Python need to be either all 64-bit or all 32-bit. This is because ExcelPython does everything in the Excel process - the alternative would be to have a separate process as a Python server which which Excel communicates, in which case you could mix and match (some other Excel/Python interfaces work this way I believe).
I will get the binaries up when I can, please DO bug me repeatedly as I might forget.
Happy New Year!
Just wondering how the 64-bit binaries are coming along.
Do you have any resolutions for 2014?
My resolution is 1920x1080.
Oh my what a terrible pun
Mine is to compile for 64bits
Happy new year!
Hey,
I am also interested in the 64-bit version. Is there any update on this?
Hi David,
I don't know if you get e-mails for posts on the general thread, I replied to you.
Regards,
Eric.
Hi Mad Tom, David,
so I had a go today at compiling the 64-bit DLL. I have no way of testing it unfortunately as I don't have a 64-bit machine, however if you could oblige that would be great.
I haven't packaged it up yet in an installer, but if you install the 32-bit version then place the attached 64-bit version of
ExcelPython.dll
inC:\Windows\System32
(not inC:\Windows\SysWOW64
which, confusingly, is where 32-bit DLLs are placed), it will hopefully work.This is the first time I've compiled anything for 64-bit, and like I said, I'm doing everything blind with no 64-bit machine, so your help is very much appreciated.
Obviously this will only work with Python 2.7.x.
Please let me know,
Many thanks,
Eric.
Cool.
I'm leaving early today, and I go catatonic during the weekends (it's hereditary). I'll start testing on Monday.
Thank you.
Last edit: Kimmy 2014-01-03
Hi Tom,
did you manage to try it out?
Please let me know!
Regards,
Eric.
Hello,
Yes, it did work for me. I had Python 2.7.6 (64-bit) installed. I had the ExcelPython1.0.0 installed. I downloaded the 64-bit dll you gave me and placed it in C:\Windows\System32. I proceeded to open Excel 2013 (64-bit) and pressed Alt+F11. Next, I went to Tools -> References and added ExcelPython27. Finally, I pressed Ctrl+G and typed ?PyStr(PyEval("1+2")) in the box and pressed enter. It worked.
Fantastic news. For an extra check, you can try**
but I'm sure it's loading the 64-bit version.
Within the next few days I'll upload a 64-bit installer.
Regards and thanks again for your help,
Eric.
** The command is a little bit unwieldy because you can't
import sys
within an expressionLast edit: Eric Reynolds 2014-01-10
That command worked too.
Tom,
FYI I've uploaded a 64-bit installer.
Regards,
Eric.
Ok, that's helpful. I have 64-bit windows, 64-bit Anaconda, and 32-bit excel. It sounds like I should dump Anaconda and move to the 32-bit version then use 32-bit ExcelPython since 64-bit Excel isn't easily available.
Is there another solution allowing me to work with 64-bit Anaconda & 32-bit Excel?
I am afraid I don't have a solution for you. 64-bit and 32-bit code cannot
exist in the same process so the only way for 64-bit python and 32-bit
excel to co-exist is for them to have two separate processes and interact
via remote procedure calls over TCP. I believe this is how some
alternatives to ExcelPython, like xlloop, are structured. Or, actually,
what you could look into is hosting a COM server from Python and calling it
from VBA.
If you really want to use ExcelPython in this way, you need ExcelPython to
load up 32-bit python, which could then communicate with a 64-bit python
server using something like the interprocess module. But it's horribly
complicated, I wouldn't recommend it.
Maybe in future I or someone else could look into extending ExcelPython to
support remotely hosted processes.
Hi, is it possible that the 64-bit installer isn't actually installing the 64-bit dll?
J've tried several time, but it ends up to copy the ExcelPython27.dll in the SysWOW64 folder.
I've manually in the system32 folder the dll attached in this discussion and it worked well, but as I need to share my code with other, would be easier if they have just to run the 64-bit installer.
Thanks
Ok I must have made a mistake in the installer I will check tomorrow
morning.
Hi, there was indeed a mistake, it needed an extra setting
ArchitecturesInstallIn64BitMode=x64
in the file setup.excel64.iss.
The new releases on GitHub will contain this bug fix, in the mean time I have recompiled the installer and attached it, let me know if it works OK now!
Eric.