Skip to content

Documentation (kind of) #1

Open

Description

@DaveyD

Hi, I am interested in this addin for excel/python
Is there any help for / instructions for this? Installation, running etc.?

Thanks,
David

P.S. I already installed it and I'm getting an error message "Can not connect to macross server"

Activity

  1. Winand commented on Feb 11, 2016

    @Winand
    Owner

    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.

    P.S. i really need to make some docs

  2. DaveyD commented on Feb 11, 2016

    @DaveyD
    Author

    Hi, thanks for your response - The project sounds great!

    1. I have python 3.5, excel 2016 but what is qt4??
    2. Does the main folder have to be placed anywhere specific, or can it be run from anywhere?
    3. 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?

    Thanks a lot!

  3. Winand commented on Feb 11, 2016

    @Winand
    Owner
    1. 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.
    2. 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)
    3. Honestly, I don't know how big this issue is.) I haven't had enough time recently to investigate and fix this.
  4. DaveyD commented on Feb 11, 2016

    @DaveyD
    Author

    Thanks again for your response
    Moving forward...

    Regarding WinPython - looks nice! However, I have 2 questions

    1. I see there are 3 versions - which one would I install?
    2. Does this replace my regular python installation?

    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!

  5. Winand commented on Feb 11, 2016

    @Winand
    Owner
    1. 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
    2. No, it's portable.
  6. DaveyD commented on Feb 11, 2016

    @DaveyD
    Author

    Great, thank you
    Started downloading 3.5.1.2 - Hope to try it soon

  7. DaveyD commented on Feb 11, 2016

    @DaveyD
    Author

    Hi, sorry about this...
    Is the lack of Qt4 on my computer

    1. the reason why I was getting "can not connect to server" error?
    2. Both Windows and Symantec are warning me about this file. Is the download from sourceforge safe

    Thanks in advance

  8. Winand commented on Feb 11, 2016

    @Winand
    Owner

    sourceforge is a well-known site, it safe

  9. DaveyD commented on Feb 16, 2016

    @DaveyD
    Author

    Hi, I finally installed WinPyhton! and I got your add-in to work!!
    Question:

    1. I was only able to run 'main.py' through opening it in spyder. Is this how it has to be done?
    2. Is there any api to know how we can interact with excel? Are they all listed in context.py?

    Thanks,
    David

  10. Winand commented on Feb 16, 2016

    @Winand
    Owner
    1. 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.
    2. 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.
  11. DaveyD commented on Feb 16, 2016

    @DaveyD
    Author

    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:

    1. So this means that I can use any objects that I use in VBA?
    2. What does top-level mean? Do you mean without referencing a parent object? What would that parent object be?
    3. 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!

    Please clarify
    Thank you very much,
    David

  12. Winand commented on Feb 16, 2016

    @Winand
    Owner
    1. Yes, you can
    2. 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.
    3. 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.

  13. DaveyD commented on Feb 16, 2016

    @DaveyD
    Author

    Understood! - Thank you.

  14. changed the title [-]Cannot connect to server[/-] [+]Documentation (kind of)[/+] on Mar 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions