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

743

u/1roOt Dec 14 '17

I think it is a really good idea. Who uses VBA anyways? Or better: who likes to use VBA?

If i have a specific problem with VBA it is a hell of a mess to find the right resources to fix my problem. With python, I just do a quick search and can find nearly limitless helpful resources.

So go python!

200

u/Chilangosta Dec 14 '17

Amen! I wish so badly I could be writing in Python instead of VBA every time I find myself writing in it.

107

u/Mikuro Dec 14 '17

Every time I find myself writing VBA, I reevaluate my life choices.

To me it's an anti-feature; all it does is make my job harder, because it's one more barrier to convincing others to invest in proper tools.

And this is coming from someone who has done a lot of work in Basic (mainly REALbasic, now known as Xojo), and liked it.

76

u/[deleted] Dec 14 '17

My experience is quite the opposite, VBA has saved me and my shop countless hours of manual data manipulation. I won't comment on VBA's features as a language, it is what it is, but its close integration with Excel/Word object model is invaluable.

53

u/Grendel84 Dec 15 '17

The fact that your username is one letter short of a palindrome is very bothersome to me

19

u/matholio Dec 15 '17

Star_Rat's name?

54

u/dedicated2fitness Dec 14 '17

Yes but that's a long winded way of saying - if I didn't have to use it I wouldn't

25

u/noodle_horse Dec 15 '17

Or, it's usable and better than nothing.

Better than nothing.

27

u/rchase Dec 15 '17 edited Dec 15 '17

Here's the thing about VBA. Accessibility. I think a lot of folks in this thread are coming at this from the point of view of experienced programmers. The value I've found in it is in its simplicity for the non-programmer.

I worked with a large team of super talented CAD guys and engineers, who all knew Excel and Access and their various CAD seats (ProE, Catia, whatever-thefuck, I'm not a CAD guy)... but they didn't know programming at all outside CNC and a bit of PLC stuff.

But when I introduced them to VBA with a large estimating / program management spreadsheet set we were developing, they took off like fish in water. Highly technical guys with a ton of knowledge, but sort of... trapped... in their various platforms. VBA just like, set them free. They started thinking differently. In weeks those dudes were performing small miracles with data sets and automation, and many of them jumped right off into other languages like Python, Perl, and even into c++, extending not only our project, but building modules for their CAD systems and cool stuff on the floor machine side. It was really cool to watch.

So yeah, way better than nothing.

19

u/brollin Dec 15 '17

But I think Python still holds that potential as a gateway language. Even more so since there are such great resources everywhere for learning Python from no programming experience whatsoever. This is a no-brainer in my mind.

5

u/rchase Dec 15 '17

Oh I absolutely agree. Just the headline, MS considering Python integration with Excel got me all.. frothy and tingle-toed.

As an admitted and somewhat recovering Excel addict, the thought of a Python shell as alternative to VBA is something approaching electric. But then... I'll believe it when I see it.

→ More replies (3)
→ More replies (2)
→ More replies (1)

13

u/brtt3000 Dec 14 '17

So that is not about VBA itself but the ability to script everything. You might use JavaScript or Lua or whatever if it would be available.

→ More replies (3)
→ More replies (16)

0

u/[deleted] Dec 14 '17

[deleted]

4

u/cuulcars Dec 14 '17

I get what you’re saying. I think OP meant people would say “Just use Excel, it can do whatever you need with VBA” but now “just using Excel” would actually be legitimate because of the support for python.

→ More replies (16)

10

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

I appreciate a good cup of coffee.

→ More replies (1)
→ More replies (15)

41

u/emmmmceeee Dec 14 '17

Who doesn’t like VBA? Source control is overrated.

Actually, being the only one in the office who knows how to maintain the VBA scripts is a form of job security. Even if the IDE looks like an exhibit from a computer museum.

3

u/bamfurlong Dec 15 '17

This is what I tell myself. Unfortunately, it immediately leads to me wondering how much I really want to keep this job ;p

→ More replies (1)

27

u/Rostin Dec 14 '17

Lots of engineers use VBA. By engineers, I mean mechanical, chemical, etc, not software.

My formal education is all in chemical engineering, so I hang around that sub a lot. At least once a month, a student asks which "coding language" he should learn, and the majority answer every time is VBA.

And in many ways, that makes sense, despite VBA's many shortcomings. These people work at companies where they may not have the freedom to install something like a Python interpreter, and certainly can't depend on any of their co-workers having done so. Microsoft Office is the thing that everyone is guaranteed to have, and (ab)using Excel is second nature.

0

u/[deleted] Dec 15 '17

[deleted]

→ More replies (3)

3

u/[deleted] Dec 15 '17

The company I work at is slowly making the migration from spreadsheets to python libraries and jupyter notebooks. They often still feed data in and out of excel but it's a start.

Like you said it's mech/elec engineers working with revit and vendor sheets and looking for ways to improve their workflow.

→ More replies (5)

8

u/[deleted] Dec 14 '17

Yeah, I've spent the last six months at work taking stuff out of Excel, processing it with python and sending it back. It would be nice to cut out that export/import step.

→ More replies (4)

6

u/nicksvr4 Dec 15 '17

I use and like VBA, but I would absolutely love Python integration.

4

u/Eurynom0s Dec 15 '17

I refuse to learn VBA.

3

u/theofficialdeavmi Dec 14 '17

I think it's a great idea as it is a great language for the job and also it will get more people into real programming languages possibly too!

→ More replies (18)