Live data from Hacker News

Use Python in Excel without add-ins

xlwings.org

51–60 of 73 posts

Re: Use Python in Excel without add-ins

#52
post #50

Earlier quoted context omitted.

When I had to spend a large amount of intimate time with VBA I used to go to http://www.cpearson.com/Excel/Topic.aspx http://www.ozgrid.com/VBA/ Old websites but in my case I dealt with Office <= 2003

Great recommendations, these two sites are still the best today. Ozgrid is my go to forum, the community there is top notch.

I'm still not sure there's another skywalker. I stopped [ab]using VBA in 2012 and unfortunately I can't recall the name yet.

Re: Use Python in Excel without add-ins

#54
post #6

This is fantastic - I am going to start testing it now. I write a fair amount of VB macros, and would much prefer to be able to use Python. And, if they could create a plugin that allowed Libre Office to do the same, they could solve one of the last remaining major interoperability issues with LO and Excel: the inability to run VB macros in LO. That would be huge.

Might be irrevelant but anyone know best source to learn VB macros?

Speaking specifically about Excel, the most important thing to learn is the Range object, no matter what book you're using:

http://msdn.microsoft.com/en-us/library/office/ff838238%28v=...

Close behind are Collections and UDTs. The best thing to level up after you're comfortable is with 'Implements' for interfaces.

I found that search engines are as good as any book for this stuff. It's smeared all over the internet.

The best place I know of to get a good understanding is http://www.cpearson.com/excel/MainPage.aspx, but it's not a tutorial.

edit: that's what I get for keeping this window open too long:) That's 2 votes for cpearson.com.

Re: Use Python in Excel without add-ins

#55
post #6

This is fantastic - I am going to start testing it now. I write a fair amount of VB macros, and would much prefer to be able to use Python. And, if they could create a plugin that allowed Libre Office to do the same, they could solve one of the last remaining major interoperability issues with LO and Excel: the inability to run VB macros in LO. That would be huge.

Might be irrevelant but anyone know best source to learn VB macros?

If you have any specific questions about VBA feel free to contact me. I spent a couple of years on macros in various contexts and still have loads of links. (I second the links already posted)

Re: Use Python in Excel without add-ins

#56
I was looking for the 'secret' sauce used to get python being able to interact with Excel: http://showmedo.com/videotutorials/video?name=2190010&fromSe...

However, I still haven't looked how the reverse is done (by xlwings.bas in Excel). Is it that XLWings also implments a COM server from which VBA can run Python?

Re: Use Python in Excel without add-ins

#58
Can anyone compare this with PyXLL[1]? It does require add-ins, but xlwings requires a VBA module. From the instructions, importing the two seem about equally complicated.

I am more curious about technical differences than the difference in license (I know that PyXLL is closed source, while XLWings is F/OSS, BSD-licensed).

[1] https://www.pyxll.com/

Re: Use Python in Excel without add-ins

#59
post #56

I was looking for the 'secret' sauce used to get python being able to interact with Excel: http://showmedo.com/videotutorials/video?name=2190010&fromSe... However, I still haven't looked how the reverse is done (by xlwings.bas in Excel). Is it that XLWings also implments a COM server from which VBA can run Python?

The source is on GitHub...

https://github.com/ZoomerAnalytics/xlwings

The magic you're looking for is here:

https://github.com/ZoomerAnalytics/xlwings/blob/master/xlwin...

Surprisingly simple actually.

Re: Use Python in Excel without add-ins

#60
post #56

I was looking for the 'secret' sauce used to get python being able to interact with Excel: http://showmedo.com/videotutorials/video?name=2190010&fromSe... However, I still haven't looked how the reverse is done (by xlwings.bas in Excel). Is it that XLWings also implments a COM server from which VBA can run Python?

[deleted]
Post reply on HN