News for hackers. Stuff that matters.
Re:Use Python in Excel without add-ins by pge on Friday September 26, 2014 @09:50AM (#8372626)
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.

Re:Use Python in Excel without add-ins by pyxll on Friday September 26, 2014 @12:19PM (#8373361)
Re:Use Python in Excel without add-ins by orf on Friday September 26, 2014 @03:00PM (#8374271)
The Python API looks horrible, basically Java code with Python syntax.
Re:Use Python in Excel without add-ins by Brakenshire on Friday September 26, 2014 @05:54PM (#8375116)
That was my impression as well, the last time I looked. Surely it can't be all that difficult to resolve?

It's a shame, having a simple python scripting system built into Calc would be a major advantage.

Re:Use Python in Excel without add-ins by mattfrommars on Friday September 26, 2014 @11:22AM (#8373084)
Might be irrevelant but anyone know best source to learn VB macros?
Re:Use Python in Excel without add-ins by pessimizer on Friday September 26, 2014 @02:09PM (#8373939)
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 by nissimk on Friday September 26, 2014 @11:31AM (#8373126)
If you are trying to automate some actions in the UI, use the record macro functionality and then edit the code. You can usually remove or combine a lot of the code it recorded.

If you want to use dictionaries/hashtable there is a reference you can add called scripting.dictionary.

When you search google for how to do stuff in VBA, most of the best answers are in Ozgrid and MrExcel sites, and of course StackOverflow.

Re:Use Python in Excel without add-ins by agumonkey on Friday September 26, 2014 @12:48PM (#8373525)
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

Re:Use Python in Excel without add-ins by medell on Friday September 26, 2014 @01:44PM (#8373805)
Great recommendations, these two sites are still the best today. Ozgrid is my go to forum, the community there is top notch.
Re:Use Python in Excel without add-ins by agumonkey on Friday September 26, 2014 @01:52PM (#8373839)
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 by bmccormack on Friday September 26, 2014 @12:42PM (#8373478)
My favorite reference is the VBA Developer's Handbook by Getz & Gilbert from 2001.

You can probably learn everything you need from Googling for solutions to problems, but that book was great when I was committed to working with Excel and Access for a while. It covers a lot of things you're not going to think to search about.

Re:Use Python in Excel without add-ins by jwe on Friday September 26, 2014 @02:09PM (#8373940)
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 by NearAP on Friday September 26, 2014 @01:21PM (#8373694)
Years ago, I used Microsoft MSDN anytime I had questions relating to VBA.
Re:Use Python in Excel without add-ins by shamney on Friday September 26, 2014 @11:27AM (#8373104)
excel 2007 vba programmers reference
Re:Use Python in Excel without add-ins by friendzis on Friday September 26, 2014 @10:07AM (#8372695)
In LO you cannot define format strings that automagically scale the number, e.g. "d = "0"mm"%%% to use meters for further calculations yet display in mm.