r/Python • • Dec 14 '17

MS is considering official Python integration with Excel, and is asking for input

Post image
4.6k Upvotes

383 comments sorted by

View all comments

413

u/decimated_napkin Dec 14 '17

Adding python support to Excel is like adding a lion to your pack of hunting dogs and then being upset when the lion just goes off and hunts by itself because your dogs are inconsequential to its success.

50

u/musashisamurai Dec 14 '17

Ehh I use openpyxl a lot. Makes it easier to visualize data and store measurements and such. Also in my company all the oldies want excel sheets anyways, so it helps.

52

u/decimated_napkin Dec 14 '17

Your last sentence is the only reason why Python for Excel is viable imo. If there weren't such a glut of legacy workbooks and lack of programmers, Excel wouldn't have much that Python couldn't do better.

56

u/teilo Dec 14 '17

Not true at all. The financial world thrives on one-off scenarios for which it would be wasteful to engage programmers every time a new case comes up which is not covered by existing tools. There is a reason EssBase is primarily used through Oracle’s SmartView plugin for Excel.

10

u/Scubastarter Dec 14 '17

First time I’ve seen someone mention Essbase around here! Do you happen to know how to refresh a SmartView query on Excel using Python?

6

u/Rivus Dec 15 '17

Your comment reminded me of this. Although you are, of course, way more on topic :)

https://en.wikipedia.org/wiki/How_does_one_patch_KDE2_under_FreeBSD%3F

2

u/WikiTextBot Dec 15 '17

How does one patch KDE2 under FreeBSD?

"How does one patch KDE2 under FreeBSD?" (Russian: «Как пропатчить KDE2 под FreeBSD?», tr. «Kak propatčitʹ KDE2 pod FreeBSD?», [ˈkak prɐˈpat͡ʃitʲ ka dɛ ɛ ˈdva pɐt fri bi ɛs ˈdi]) is an internet meme in Russian Internet culture.

The question was originally posted on the #anime channel of the RusNet IRC network on May 8, 2004. Its text can be translated as follows:

— Hello, is this an anime channel?


[ ^PM | Exclude ^me | Exclude from ^subreddit | FAQ / ^Information | ^Source | ^Donate ] Downvote to remove | v0.28

2

u/Scubastarter Dec 15 '17

Hahaha

You miss 100% of the shots you don’t take!

0

u/[deleted] Dec 14 '17

[deleted]

0

u/[deleted] Dec 15 '17

[deleted]

3

u/[deleted] Dec 15 '17 edited Dec 15 '17

Yeah, I've started packaging my py scripts into single file .exes and sending them to people in my org. Problem is they are often hundreds of mbs for 20 lines of code because of the packages they use.

EDIT: Then again, the packages are what make 20 lines of code useful so I guess thats just the beauty of python.

1

u/boatsnbros Dec 16 '17

Yep 100% - portability would be my #1 concern with this. Even python support as an external package wouldn't make much of a difference in the landscape. Theres xlwings, openpyxl already. Unless it becomes built in (either by default or easily enabled) I don't see much changing in terms of actual business use.

→ More replies (9)

22

u/Chilangosta Dec 14 '17

To your point: A lot of people, myself included, started with VBA and then learned Python when VBA just wouldn't cut it. If MS truly integrated Python with Excel, it could help spawn a new group of programmers.

8

u/decimated_napkin Dec 14 '17

I was the same way. Still so grateful for VBA as it helped spawn my interest in programming, but now I find it completely unnecessary.

4

u/continue_stocking Dec 14 '17

VBA was my gateway language too. I needed programmatic control that formulae couldn't give me, and it's been a ride ever since. I can't imagine how much easier things would have been if I could have learned Python instead of that dead language. VBA teaches you that working with classes is hard, and this mindset was probably the greatest impediment to my development as a programmer.

→ More replies (1)

4

u/jwink3101 Dec 14 '17

I used to agree 100%, but there were recently a few things where I wanted a quicker and easier view of the affect of some parameter changes. It was pretty trivial but I did it in excel and was pretty happy. I think the real advantage is to (more) quickly input and visual data.

But, I would say 99% of the time, coding is better.

My dad does some pretty intense stuff in excel that should be done in code. He has nested functions and if statements as many as 10 or so deep. It's a debugging nightmare!

2

u/otterom Dec 15 '17

Sounds like bad code. Really, nested should go about 3 deep.

I've been guilty of 4 before, but that was only for a search feature that "looped" though a database, so hitting the end meant your search would start from the top again.

Actually, it's one sexy piece of code. I considered printing it out and hanging it in my cubicle, but didn't want to be "that guy" at work.

Anyway, your dad should look into case statements.

0

u/[deleted] Dec 15 '17

[deleted]

4

u/decimated_napkin Dec 15 '17

I use Excel every day, it's still my go to software for a lot of things. But just because a lot of people are too lazy to learn how to code doesn't change the fact that anything that can be done in Excel can be done in Python at a much larger scale and with significantly better performance.

→ More replies (3)