You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Requirements: qt4, python3, excel 2007+. This project still needs many improvements.
You run main.py it stays in system tray, then open xlam add-in, it should see server.
OR
open add-in first, open it's prefs and set paths to server and python. Server will start when needed. (This way will raise a still unresolved problem: Excel stays in process list while server is running, even if you close excel windows.)
See source/default.py for macros examples. You may create more modules in source folder. Modules are auto-reloaded when server detects, you've made any changes.
Hi, thanks for your response - The project sounds great!
I have python 3.5, excel 2016 but what is qt4??
Does the main folder have to be placed anywhere specific, or can it be run from anywhere?
The problem of excel staying in the processes even after the app gets closed, is this a bigger issue than it sounds? Or is it simply not preferred behavior?
Qt is a GUI framework (in fact not only GUI). It's needed here cause interface is built with it.
1.1. I use WinPython which includes Python and a good set of additional libraries including Qt. Also it's portable.
It doesn't matter where the main folder is because server and add-in communicate over TCP. (Though add-in should be able to find and start server if you haven't done it beforehand. As stated in my previous comment)
Honestly, I don't know how big this issue is.) I haven't had enough time recently to investigate and fix this.
Cause we use Qt4 here, don't download 3.4.4.1Qt5. You can use 3.5.1.2 and 3.4.4.1, Python3.5 doesn't support mingwpy now, but for my project there's no difference. Also do not download WinPython-XXbit-X.X.X.XZero.exe package
It's one of the ways to run it. You can also do smth like this: D:\....\WinPython-32bit-3.4.4.1\python-3.4.4>python "D:\....\main.py". Also Python programs can be converted to .exe with cx_freeze package, but there may be problems with generated cache for COM objects.
API is the same as VBA cause i use COM objects. See app_ctxs to find out which top-level attributes are available (you may add something:). They are set in context method when macro is called. Also "Application" (and "App" which is the same) attribute is set.
Thanks!
Regarding # 1, understood, thanks! (I still never tried freeze - till now I'm still in scripting mode... :))
Regarding # 2, Wow, this sounds really nice! A few questions:
So this means that I can use any objects that I use in VBA?
What does top-level mean? Do you mean without referencing a parent object? What would that parent object be?
You mentioned that I can add. You mean to say that I can just add a word into app_ctxs var and it will be added? Unbelievable!
app_ctxs contains names of members of VBA's Application object, which you can use w/o referencing to this object. E. g. you can use Workbooks object directly (instead of Application.Workbooks) as in VBA.
See above.
UPD:
I also added some additional methods which can be exported from context if needed: Like, DateValue, RGB, TypeName, MsgBox. They aren't supposed to work exactly as in VBA, e. g. Like uses regex to check pattern.
Activity
Winand commentedon Feb 11, 2016
Requirements: qt4, python3, excel 2007+. This project still needs many improvements.
You run
main.pyit stays in system tray, then openxlamadd-in, it should see server.OR
open add-in first, open it's prefs and set paths to server and python. Server will start when needed. (This way will raise a still unresolved problem: Excel stays in process list while server is running, even if you close excel windows.)
See
source/default.pyfor macros examples. You may create more modules insourcefolder. Modules are auto-reloaded when server detects, you've made any changes.P.S. i really need to make some docs
DaveyD commentedon Feb 11, 2016
Hi, thanks for your response - The project sounds great!
Thanks a lot!
Winand commentedon Feb 11, 2016
1.1. I use WinPython which includes Python and a good set of additional libraries including Qt. Also it's portable.
DaveyD commentedon Feb 11, 2016
Thanks again for your response
Moving forward...
Regarding WinPython - looks nice! However, I have 2 questions
Regarding points 2 & 3 above - perfect! Thank you very much
As soon as I get this new package (with qt4) installed, I will begin to test your project
Thanks a lot!
Winand commentedon Feb 11, 2016
3.4.4.1Qt5. You can use3.5.1.2and3.4.4.1, Python3.5 doesn't supportmingwpynow, but for my project there's no difference. Also do not download WinPython-XXbit-X.X.X.XZero.exe packageDaveyD commentedon Feb 11, 2016
Great, thank you
Started downloading 3.5.1.2 - Hope to try it soon
DaveyD commentedon Feb 11, 2016
Hi, sorry about this...
Is the lack of Qt4 on my computer
Thanks in advance
Winand commentedon Feb 11, 2016
sourceforge is a well-known site, it safe
DaveyD commentedon Feb 16, 2016
Hi, I finally installed WinPyhton! and I got your add-in to work!!
Question:
Thanks,
David
Winand commentedon Feb 16, 2016
D:\....\WinPython-32bit-3.4.4.1\python-3.4.4>python "D:\....\main.py". Also Python programs can be converted to .exe withcx_freezepackage, but there may be problems with generated cache for COM objects.app_ctxsto find out which top-level attributes are available (you may add something:). They are set incontextmethod when macro is called. Also "Application" (and "App" which is the same) attribute is set.DaveyD commentedon Feb 16, 2016
Thanks!
Regarding # 1, understood, thanks! (I still never tried freeze - till now I'm still in scripting mode... :))
Regarding # 2, Wow, this sounds really nice! A few questions:
Please clarify
Thank you very much,
David
Winand commentedon Feb 16, 2016
app_ctxscontains names of members of VBA'sApplicationobject, which you can use w/o referencing to this object. E. g. you can useWorkbooksobject directly (instead ofApplication.Workbooks) as in VBA.UPD:
I also added some additional methods which can be exported from
contextif needed:Like,DateValue,RGB,TypeName,MsgBox. They aren't supposed to work exactly as in VBA, e. g.Likeuses regex to check pattern.DaveyD commentedon Feb 16, 2016
Understood! - Thank you.
[-]Cannot connect to server[/-][+]Documentation (kind of)[/+]