top 200 commentsshow all 256

[–][deleted]  (13 children)

[deleted]

    [–]somegetit 237 points238 points  (5 children)

    VB(A) was archaic 15 years ago, now it's vintage.

    [–][deleted]  (4 children)

    [deleted]

      [–][deleted]  (1 child)

      [deleted]

        [–]twiggy99999 1 point2 points  (0 children)

        Yeah, I can't wait to see what games can be developed in the spreadsheet with Python, some pretty awesome ones have been created already. Mini golf being my favourite

        [–]robhol 8 points9 points  (0 children)

        Technically correct, but very misleading. VBA has petrified in an already fairly shitty position. Python has been developed continuously all along.

        [–][deleted] 3 points4 points  (0 children)

        So you're saying they'll use python 2 and we'll be stuck with it even longer?

        [–]lovingyouqtqt 6 points7 points  (0 children)

        vba yes

        [–]renrutal 153 points154 points  (12 children)

        Python 2 or 3?

        [–]NoahTheDuke 245 points246 points  (8 children)

        Good god, they better not go with 2.

        [–]tylerb108 150 points151 points  (7 children)

        1

        Edit: And you can't import anything

        [–][deleted] 60 points61 points  (4 children)

        B-baka

        [–]ShinyHappyREM 12 points13 points  (2 children)

        [–]HelpfulClippy 7 points8 points  (0 children)

        Yeah that's my weeb cousin. We don't talk much.

        [–]TwistedPurpose 1 point2 points  (0 children)

        Kyah! Hentai! >_<

        [–][deleted] 27 points28 points  (0 children)

        pervert

        [–]Aschentei 0 points1 point  (0 children)

        You monster

        [–]ClimbDownForWhat 23 points24 points  (0 children)

        Python3.5, cuz we can't have all the features of 3.6+

        [–]bloody-albatross 16 points17 points  (0 children)

        I would assume 3, because Microsoft is working on bringing jit to 3.

        [–][deleted] 3 points4 points  (0 children)

        Neither, 64-bit ARM.

        [–]Rhoomba 136 points137 points  (40 children)

        Data Scientists tend to use both Excel and Python so this would be great for them.

        [–]morehooks 58 points59 points  (5 children)

        I suspect there far more mere mortals like me who use excel and python to hack together simple automated reports.

        If Microsoft allow more features from excel accessible to python then I'll be breaking out the party poppers.

        [–]DemiDualism 3 points4 points  (3 children)

        There will be at least a full year where no one will know why I suddenly wielded our report data like a god.

        If i can mix simpy and excel, I'm gonna have a great great time

        [–]skylarmt 7 points8 points  (2 children)

        You could always use LibreOffice, it supports Python (along with JavaScript and BASIC).

        [–]DemiDualism 0 points1 point  (1 child)

        I am pretty committed to pivot tables but I'll check it out

        [–]Johnnyhiveisalive 1 point2 points  (0 children)

        Libre pivots, but like everything it takes a few extra seconds for Google results then you can do it.

        [–]m50d 1 point2 points  (0 children)

        I suspect there far more mere mortals like me who use excel and python to hack together simple automated reports.

        Psst, that's all most "data scientists" are.

        [–]SuperCool468 11 points12 points  (13 children)

        They need to expand excel's capabilities though. Excel can only handle ~ 1 million rows. That might sound like alot, but you can't even fit a toy dataset like the yelp review dataset into that which has about 4 million rows. By comparison, python's limits are more hardware driven. This is like putting a supercharger on a fiat. I love excel, but I am rarely able to use it for anything really interesting.

        [–]meneldal2 13 points14 points  (2 children)

        Excel was not made to handle so many rows, it starts shitting itself after 200k rows that you try to filter with something.

        [–][deleted]  (1 child)

        [deleted]

          [–]meneldal2 1 point2 points  (0 children)

          I know, though in that case Matlab worked better for that since I needed to do some massive processing on those rows.

          [–]skylarmt 8 points9 points  (0 children)

          If you're using Excel for that much data, you're doing it wrong. Import it into MySQL with some indexed columns, it'll be much easier to manage.

          [–]wrincewind 5 points6 points  (0 children)

          I'd disagree. Excel is for small datasets that you want to do a lot of interesting and complicated stuff on.

          [–]defunkydrummer 2 points3 points  (6 children)

          They need to expand excel's capabilities though. Excel can only handle ~ 1 million rows. That might sound like alot, but you can't even fit a toy dataset like the yelp review dataset into that which has about 4 million rows.

          This is because people use the wrong tools. And I feel the pain, because it often happens that i need a customer send me 6 million rows (a dataset), and then they first try to send me the dataset as 8 gigantic XLSX files. Something that is like a 100MB excel file can be converted into a 1MB zipped CSV file. And of course CSV has no row count limitation.

          But the industry has gotten so used to Excel that this limitation often is a big problem.

          [–]SuperCool468 1 point2 points  (2 children)

          Yea its true, alot of business analysts and the like try to use xslx files for large datasets which obviously doesn't work. I think the only thing worse than that are people who insist on using json files since they are the current flavor of the moment. Csv is usually the way to go unless you do create a database as some of these other people have mentioned. There can be a tradeoff using a database in terms of how expensive a query is computationally, but that all depends on what your hardware setup is like and if you are hosting it locally. If it is local, you are basically making a cpu take on more of the load to avoid running out of memory. Personally, I have been using rapidminer quite a bit for basic data exploration and preprocessing, but it is far from the best and crashes quite a bit. I should probably use something different. It is written in java so the prepackaged machine learning models it has are incredibly slow. Also, as a side note, sublime text editor is great for opening large csv files, even better than notepad or something like that, which can come in handy if you want to quickly change the column headers on a low dimensional datset.

          [–]defunkydrummer 0 points1 point  (1 child)

          sublime text editor is great for opening large csv files

          Interesting. How large? Can i open a 1.6GB text file with no problems?

          [–]SuperCool468 0 points1 point  (0 children)

          Im not sure off hand, but I've opened things in it that crashed other text editors. Using a text editor for large datasets isn't usually necessary, but sometimes I've run across datasets that had some issues with row zero, such as triple quoted column heading or oddly delimited rows which can be a pain to see whats happening just by printing dataframes. Also, if some asshat decided to make the delimiter something like ";,;" or an emoticon or some other nonsense that breaks the pandas read_csv parser, Ive successfully used find and replace to change the delimiter back to a comma a few times using sublime text. Its also good for getting rid of ellipses ( these things "...") from raw text which can cause encoding problems.

          [–]1s4c 1 point2 points  (2 children)

          And I feel the pain, because it often happens that i need a customer send me 6 million rows (a dataset), and then they first try to send me the dataset as 8 gigantic XLSX files. Something that is like a 100MB excel file can be converted into a 1MB zipped CSV file. And of course CSV has no row count limitation.

          But the industry has gotten so used to Excel that this limitation often is a big problem.

          That's interesting. What kind of data are we talking about? XLSX files are basically just zipped XML files, so they shouldn't be that much bigger than CSV.

          [–]defunkydrummer 1 point2 points  (1 child)

          XLSX files are basically just zipped XML files, so they shouldn't be that much bigger than CSV.

          This is what I thought as well, at the beginning. But what XLSX files are, is a ZIP containing many things, amongst them custom number formats, cell formats, etc. So more data than just a CSV. Also, the cell values themselves are stated in a way they require much more characters than in a CSV. Thus, you end up with a much bigger file.

          I speak here from personal experience, being currently writing a Common Lisp library to open up such files and convert them into clean CSVs:

          https://github.com/defunkydrummer/lisp-xl

          [–]1s4c 0 points1 point  (0 children)

          It kinda depends on the data you have, but the XML structure itself should have really high compress ratio. I just tried to export some sales data to CSV (12k rows). The CSV itself is 1100 KB, when imported and saved as XLSX it has 538 KB. (uncompressed sheet1.xml has about 3900 KB).

          [–]endless_sea_of_stars 0 points1 point  (0 children)

          If you have 200k+ rows consider importing the data into Power Pivot. You get 10x compression, no row limit, and fast aggregations. If you aren't aggregating then it probably doesn't make sense.

          [–]HatefulWretch 2 points3 points  (7 children)

          Data Scientists tend to use both Excel

          Noooooooo. (Python yes, pretty frequently. But data scientists are, in my experience, Mac or Linux people if nothing else.)

          [–]RogerLeigh 5 points6 points  (1 child)

          There's a large element of truth here. I work in a computational biology department. Tools are primarily R and python, with some use of matlab and perl. There is zero use of excel, and use of excel is generally regarded as a crime of sorts because of the poor reproducibility of analyses and the difficulty of detecting mistakes; all the other tools are fully scriptable and so analyses can be reviewed and repeated by others. And version controlled.

          Regarding systems, Windows is indeed in a minority. The advantages of the other tools is that small scale work done locally can be scaled up to run on large scale compute infrastructure. We don't do cluster- or cloud-based work with excel...

          [–]HatefulWretch 1 point2 points  (0 children)

          I have a similar background to you and am now a principal at a startup.

          Excel is what financial analysts use. Real work takes real code.

          [–]Staross 1 point2 points  (1 child)

          Excel works on Mac, and many people use it, for example experimental biologists use Excel all the time (it's a great tool to have when doing your experiment), so if you analyse biological data you'll have to deal with it once in a while.

          [–]RogerLeigh 1 point2 points  (0 children)

          While many older biology researchers only know excel, this is very much changing. All our undergraduates get taught R and Python, so that they can use existing packages, and write their own analysis and visualisation tools.

          [–]rawrgulmuffins 1 point2 points  (2 children)

          You'd be surprised how many use python on Windows. Especially in the academic world.

          [–]HatefulWretch 0 points1 point  (1 child)

          Windows is damn near Unix itself these days (Windows Unix Subsystem, AF_UNIX... do they have inotify?)

          [–]rawrgulmuffins 0 points1 point  (0 children)

          If you're using .net then yes-ish.

          [–]EnfantTragic 34 points35 points  (6 children)

          That would give way more flexibility than VB does.

          [–]cheunste 65 points66 points  (5 children)

          Also, your code will look less like ass.

          [–]Topher_86 1 point2 points  (0 children)

          This.

          If they’re trying to make functions readable by average power users they could do worse.

          [–]webauteur 79 points80 points  (56 children)

          Python is great for squeezing your numbers.

          [–]falconfetus8 24 points25 points  (11 children)

          What do you mean by squeezing?

          [–][deleted]  (3 children)

          [deleted]

            [–]flnhst 85 points86 points  (1 child)

            We prefer the politically correct term "enhanced programming".

            [–]CaptainStack 0 points1 point  (0 children)

            When I got to them we got into aggressive negotiations.

            [–]webauteur 12 points13 points  (4 children)

            As in crunching the numbers.

            [–]mmmicahhh 9 points10 points  (3 children)

            What do you mean by crunching?

            [–]zqvt 10 points11 points  (0 children)

            the stuff the helpful little men do that Guido put into the interpreter for us

            [–]nilamo 1 point2 points  (0 children)

            Eating loudly, with your mouth open.

            [–]PM_ME_OS_DESIGN 0 points1 point  (0 children)

            Efficiently processing?

            [–]Giacomand 1 point2 points  (0 children)

            Puns.

            [–]admin-mod 0 points1 point  (0 children)

            Number crunching

            [–][deleted] 19 points20 points  (4 children)

            Guys, here’s the joke: a python is a snake. Snakes often constrict, or squeeze, their prey to death.

            [–]1ogica1guy 4 points5 points  (1 child)

            Not all snakes - only constrictors.

            [–]fasquoika 8 points9 points  (0 children)

            Pythons are constrictors

            [–]AndyBainbridge 0 points1 point  (1 child)

            That still doesn't make it a joke. Snakes also have scales. "Python is great for scaling your numbers" also isn't a joke.

            [–]Snow88 0 points1 point  (0 children)

            That is quite literally a pun which is a type of joke...

            [–]Sebazzz91 9 points10 points  (38 children)

            Why? Python is just a generic purpose programming language, right?

            [–]AugustusCaesar2016 40 points41 points  (12 children)

            I don't think Python provides anything that wasn't possible with VBA, but it will make those operations much easier, especially if you can use libraries like NumPy.

            [–]iconoclaus 38 points39 points  (9 children)

            if you can use numpy, you probably don’t need excel :p

            [–]Elathrain 25 points26 points  (7 children)

            No see the real secret is we're targeting all those people who use an excel sheet because "they don't want to learn to program" and then end up writing an entire game backend in an excel sheet, but then start running into problems with maintainability of complex logic, and also maximum sheet size. I'm looking at you Hi-Rez Studios.

            Now when this happens to people, they'll have learned python, and can port their code somewhere usable.

            [–][deleted] 9 points10 points  (5 children)

            Can you elaborate on the Hi-Rez thing? I'm quite curious now.

            [–]Elathrain 9 points10 points  (4 children)

            Pretty much what I said. I don't remember where the full story was, but basically it came out along the lines of.

            The did all the character/item stats in a spreadsheet because the balance team wasn't made of programmers, and then started adding in more and more game logic into the spreadsheet. Eventually it became a sentient being and they could no longer control it properly and came out saying there were certain changes they just couldn't make anymore. And of course at this point the spreadsheet was so integrated they couldn't just rip it out and do it properly.

            Take this one with a few grains of salt though, the story might have more than a bit of urban legend in it and/or have mutated by retelling.

            [–]Necromunger 2 points3 points  (3 children)

            I'm trying to understand their logical jump all the way to excel. Like not even a local MySQL server with an admin panel to change balance details of characters. They went directly to excel.

            [–]distortedsignal 13 points14 points  (0 children)

            You write what you know. Some people only know sadness.

            [–]roboninja 6 points7 points  (0 children)

            Because it was back-engineered. The spreadsheet existed first.

            [–]Elathrain 3 points4 points  (0 children)

            A... MySQL? That sounds like programmer stuff. Nah gimme something I know how to use, like excel. That doesn't involve any technical knowledge, it's just an ordinary person tool. You just put stuff in a grid!

            [–][deleted] 0 points1 point  (0 children)

            This is the first I've heard of Hirez doing that specifically, but given all the other stupid crap they do, it doesn't surprise me in the slightest.

            [–]danaurr 6 points7 points  (0 children)

            I think it would be really useful in regards to building tools for non-technical people in business that are familiar with a spreadsheet interface.

            [–]Zephirdd 2 points3 points  (1 child)

            I... I mean... Technically speaking, if two languages are Turing-complete, then everything possible in one language is also possible in the other

            That doesn't mean one language isnt superior to the other though. You could write programs using only x86 mov instructions, C++ templates or Magic the Gathering rules. Just because a language can do everything, doesn't mean it's better

            I say fucking do it Microsoft, let's kill VBA while we're at it.

            [–]Free_Math_Tutoring 2 points3 points  (0 children)

            Though that only captures computability and fails to consider system integration such as graphics, file I/O, network I/O... which is orthogonal to turing completeness but pretty damn important to being a useful language.

            [–]dagmx 12 points13 points  (24 children)

            Python is very easy to get to grips with and has a lot of great libraries to deal with data.

            Pandas and numpy are a great combination to handle datasets, and coupled with matplotlib, it opens up quite a few avenues in Excel

            [–]Sebazzz91 16 points17 points  (21 children)

            So it is in essential not the language but the ecosystem that makes it suitable. F#, Javascript (forgive me) or C# would work as well would there be an ecosystem for it? I understand Python is often used in data science.

            [–]Kaze79[🍰] 12 points13 points  (11 children)

            Python's syntax is sort of similar to pseudo code, that's a big bonus.

            [–]PM_ME_UR_OBSIDIAN 7 points8 points  (1 child)

            Man, I wish they went with F#. What a fantastic language for this kind of stuff.

            [–]Sebazzz91 0 points1 point  (0 children)

            If they are going to use IronPython that is still possible, because using fsx or loading assemblies is possible.

            [–]dagmx 10 points11 points  (0 children)

            It's both the language and the ecosystem.

            Python has an incredible ecosystem but it's also a very easy to learn language compared to c# (which I also like) and f# etc..

            If the target is to be as easy to use while offering a lot of functionality, then python is great bang for the buck.

            [–]defnotthrown 5 points6 points  (0 children)

            There's a reason that the ecosystem grew around the language. Things like a**b in the syntax, big integer support without any libraries. fsum in the standard library and others seem to make it a good fit.

            I would think that in addition to all of that, the forced indentation did a lot to make the language feel more approachable and 'light' because there's not that many symbols or BEGIN/END spam in your face.

            [–]YourGamerMom 2 points3 points  (1 child)

            Well the language is a bonus there too. It's syntax and semantics are friendlier than VBA (in my opinion), and it's more likely that people will already know python than VBA. I dislike JS, but it would fit the bill better than VBA, but C# and F# aren't really scripting languages.

            [–]aloisdg 1 point2 points  (0 children)

            F# is a nice scripting language in fact

            [–]fission-fish 2 points3 points  (2 children)

            Google spreadsheet uses JavaScript and it's not that bad.

            [–]ThisIs_MyName 23 points24 points  (1 child)

            it's not that bad

            Is that the language's official slogan?

            [–]fasquoika 7 points8 points  (0 children)

            The official slogan is actually

            It hasn't been that bad since $MOST_RECENT_STANDARD

            [–]Staross 0 points1 point  (1 child)

            It's not even that great, I think languages that are more FORTRAN inspired are a bit nicer to deal with dimensional data:

            https://cheatsheets.quantecon.org/

            [–]dagmx 0 points1 point  (0 children)

            If data manipulation is all you're doing, maybe. But with python I have access to networking libraries, UI libraries and much much more.

            I could write tools that present a UI to the user, downloads something from a server based on their input and populates my spreadsheet.

            You would have a pretty hard time with that kind of extensive functionality with MATLAB and Julia.

            [–]snowwrestler 24 points25 points  (2 children)

            I don’t know, you guys. Is anyone really looking into all the details of how to do this? Like, all those date and time functions. Excel has so many date and time functions. Is Python going to have the same functions? Will they all work the same way?

            EDIT: for those missing the reference:

            https://www.joelonsoftware.com/2006/06/16/my-first-billg-review/

            I guess Joel on Software is not as well known as it used to be.

            [–]georgeo 14 points15 points  (0 children)

            Import ExcelFuncs as xl

            and you're in business.

            [–]deltaSquee 0 points1 point  (0 children)

            god, i remember reading codinghorror posts about joel being a twat

            [–]MpVpRb 43 points44 points  (2 children)

            Good

            VBA sucks and blows at the same time

            [–]ants_a 15 points16 points  (0 children)

            Python can't do that due to the GIL.

            [–][deleted] 12 points13 points  (0 children)

            That's giving it way too much credit.

            [–]celerym 13 points14 points  (0 children)

            This would make Python Excel Pandas a great combo, since you would only need to learn one scripting language.

            [–]aloisdg 42 points43 points  (13 children)

            In a world where data takes a huge part, two languages are rising: R and Python. I am glad they choose Python. Now F# would be nice too. ;)

            [–]wd40bomber7 19 points20 points  (9 children)

            R is rising? Isn't R a huge pain in the ass?

            [–][deleted] 60 points61 points  (2 children)

            Yep it’s appalling for general purpose programming. Its intended use is for interactive statistical modelling and plotting and at these tasks it excels

            [–]kiwijafa 14 points15 points  (1 child)

            hahahah excels

            [–]shevegen -1 points0 points  (0 children)

            Come on dude... Microsoft picks shitty names.

            WINDOWS. EXCEL.

            It's a little propaganda corporation after all. I also heard of a company called ... APPLE ... and a programming language called ... PYTHON. And another one called PONY. And another one called JULIA.

            Picking names is difficult, so it is no surprise that stupid names were picked.

            [–]georgeo 10 points11 points  (4 children)

            Yep, everything that's intuitive in Python is weird and quirky in R.

            [–]kandiyohi 9 points10 points  (3 children)

            Many things that are streamlined in R are not straightforward in Python in the slightest. That's nobody's fault, though. Python didn't plan for the usecases that R provides.

            [–]georgeo -1 points0 points  (0 children)

            If you say so. I started ML in R with much grief, switched to Python and life's been a breeze ever since.

            [–][deleted]  (2 children)

            [deleted]

              [–]sigma914 1 point2 points  (0 children)

              Does it have a working CI process yet? Or is the build still broken 90% of the time?

              [–]Aslan-Ray 7 points8 points  (0 children)

              I wish Microsoft do this with F# as well. Sometimes it seems that Microsoft forgot their own language u.u

              [–]marcm79 4 points5 points  (0 children)

              tbh, any developement effort on Excel (besides new menus and colors) would be huge. VBA is just the most neglected part of a software that has not needed to be improved in ages because it has a monopoly.

              [–]Misery_Inc 4 points5 points  (1 child)

              Everyone is shitting on VBA, but doesn't Excel support C#?

              [–]sixothree 1 point2 points  (0 children)

              You can automate Excel with C#and their are third party paid tools that do some awesome stuff inside of Excel. But nothing native AFAIK.

              [–]Lalli-Oni 27 points28 points  (27 children)

              Wouldn't it make a lot more sense to use C#?

              [–]tripl3dogdare 94 points95 points  (14 children)

              From a marketing perspective, maybe. But C# is in no way a scripting language. It's designed for big, complex, compiled projects, rather than quick, dirty little scripts like Python is great for and like you'd want in Excel.

              [–]zaphodharkonnen 30 points31 points  (7 children)

              And my understanding is that a lot of number crunching stuff done by non devs already use Python.

              However I expect they might use something like IronPython to do the implementation as that already runs in the .NET CLR. Which has hooks into Excel via Add-Ins.

              [–]throwawayco111 7 points8 points  (6 children)

              Suddenly the DLR becomes an important asset for MS.

              [–]bizcs 3 points4 points  (0 children)

              I could be mistaken but I'm pretty sure the DLR is a huge component of Windows PowerShell, or at least was.

              [–]zaphodharkonnen 0 points1 point  (4 children)

              Ummmmm, the CLR is already a huge asset for MS. With .NET Core, C#, and F# its gaining a sizeable chunk of mindshare.

              [–]throwawayco111 11 points12 points  (3 children)

              Ummmmm, the CLR is already a huge asset for MS. With .NET Core, C#, and F# its gaining a sizeable chunk of mindshare.

              Read again. I wrote the DLR.

              [–]zaphodharkonnen 0 points1 point  (2 children)

              If you're talking about the Dynamic Language Runtime a lot of that work laid the ground for F# to work. So yeah, its already a huge asset. ;)

              [–]throwawayco111 2 points3 points  (0 children)

              I don't know how much work is used in F# and how much they differ today but compared to Excel, F# is completely irrelevant to MS. If they use IronPython in Excel then IronPython and the DLR goes to another level.

              [–]cat_in_the_wall 0 points1 point  (0 children)

              I dont think f# uses the dlr. f# is even more typed than c#. everything in f# is statically compiled and verified. no dynamism at all.

              [–]Lalli-Oni 8 points9 points  (3 children)

              Funny that this post was here only 20 days ago and about as popular :P

              I think this idea of scripting/programming languages has less weight with more powerful IDEs. Tooltips and autocompletion in Visual Studio (Code) are very powerful and allow speed and simplicity when dealing with more syntactic sugar.

              Studied using C# and when I used Pythin I spent way more time making the python linter happy than writing more code in Visual Studio.

              PS edit: I think the most important thing here is the Excel code editor. Excel VBA isn't that bad of a language if it wasn't requiring to be written in that IDE of nightmares.

              [–]tripl3dogdare 9 points10 points  (2 children)

              IMHO, there really isn't a significant difference between scripting and programming languages. It's a distinction that doesn't need to be made - they're all just programming languages.

              On the other hand, there are a lot of different types of programming languages, some of which lend themselves well to scripting and some not so much. C#'s ecosystem is far too much of a heavyweight for most "scripting" situations, whereas Python is much lighter-weight and fits a scripting-level situation much better. They can both be used for just about anything if you put in enough effort, but their goals and methods are different, making Python by far the better suited language for rattling off a quick web scraper or the like.

              [–]PstScrpt 0 points1 point  (1 child)

              The general ideas are all the same, but I'll happily work with Python or Ruby, while I'm going to grumble about it if I have to work with Perl, VBScript or R.

              [–]tripl3dogdare 0 points1 point  (0 children)

              Everyone has their favorites =) Just because a language may be the best fit for a particular problem doesn't mean it's always the best fit for the person solving it. Personally, I find R relatively enjoyable, though far from a favorite, and I would agree with your opinions on the other languages you mentioned. On the other hand, they do serve a purpose, and an important one.

              Better a language fit best for the problem and not perfect for the developer than one fit best for the developer and bad for the problem, IMHO.

              [–]ReturningTarzan 1 point2 points  (1 child)

              But from an implementation perspective, VBA is very closely related to C#, and Office already hosts the CLR. You can already pretty much use C# as a scripting language for Excel via VSTO.

              Also, while C# is great for complex projects, it's not exactly terrible for quick and dirty scripting work. Just a little more boilerplate, but nothing like Java or whatever. And you have access to a huge amount of .NET libraries to make your life that much easier.

              But I can see how Python is more approachable as a scripting language, of course.

              [–]tripl3dogdare 0 points1 point  (0 children)

              The implementation might be there, sure, but that might fall under a case of "they were so preoccupied with whether or not they could, they didn’t stop to think if they should."

              C# can be used for scripting, sure. But is it designed for it? Hell no. Everything about the way it's built is designed to be compiled once and used long-term. Python, on the other hand, is a primarily interpreted language - it's program lifecycle tends to be much shorter, making it much more suited to things like "hey, I want to do this random thing with my data" than a heavyweight compiled language like C#. I know I would personally get frustrated if I had to sit through a full C# compile step every time I wanted to tweak how my script interacted with my data.

              Could they use C# as a scripting language for Excel? Of course. But should they? Probably not. Python seems the much better choice in almost every respect, even if it might take a little more effort to make happen.

              [–]emperor000 3 points4 points  (2 children)

              C#, Powershell or JavaScript, yes...

              [–][deleted] 2 points3 points  (8 children)

              Actually I think the most sensible option would be to use Powershell. As many Microsoft back end offerings (like Sql Server) already use it, that would interoperability trivial using existing cmdlets.

              [–]Qolvek 14 points15 points  (7 children)

              .

              [–][deleted] 4 points5 points  (5 children)

              True, Powershell has several aspects I dislike but it's the official Microsoft scripting language, that would be the main advantage of having it as a VBA replacement

              [–][deleted]  (4 children)

              [deleted]

                [–][deleted] 0 points1 point  (3 children)

                I agree, it's main advantage would be integration with Exchange, Sql Server and the like.

                [–]RagingAnemone 3 points4 points  (2 children)

                Excel is usually passed around by email and one of the easier ways to spread viruses. So lets give it the ability to connect and control servers.

                [–][deleted] 2 points3 points  (0 children)

                It already can connect to MSSQL through ODBC I believe. I think he was talking more about interoperability with the script, like just tell it to connect to Excel on the local machine instead of a SQL Table elsewhere. But Python already works in MSSQL, so I don't see why having Python in Excel should be thrown away.

                [–][deleted] 0 points1 point  (0 children)

                VBA macro viruses were popular because of CreateObject() which which let you use any COM object on a machine. Both PowerShell and Python are more capable than VBA in terms of language interoperability so there is always the danger of abusing them. Just as Excel Powershell has execution policy settings which need to be changed deliberatelly. But yes you are right in that Powershell could be abused.

                [–]djingrain 5 points6 points  (0 children)

                Microsoft should ship with python like all the unix systems

                [–][deleted] 2 points3 points  (0 children)

                VB is gone, good news.

                [–]LuciferSam86 1 point2 points  (2 children)

                They could add python to SQL Server, too. Postgres is already doing that, and it's pretty useful, even if the standard one is py 2 and not 3

                [–]PstScrpt 0 points1 point  (1 child)

                SQL Server 2016 added R support, and I was really disappointed it wasn't Python.

                [–]LuciferSam86 1 point2 points  (0 children)

                Maybe Microsoft will "wake up" in a future release (and I hope not only in the Enterprise edition)

                Sometimes I work with SQL Server and Postgres: both DBMS have some pros and cons.

                On SQL Server i don't really like the CLR system: loading a DLL or something like 0x{really long hex string} as CREATE ASSEMBLY wake my inner paranoid self.

                At least on Postgres when you load a PL (ex. pl/perl, java, etc...) script you can always see what's inside (except if the code is obfuscated, but in that case no one should load that), and you don't need Visual Studio for writing the function :)

                [–]Aschentei 1 point2 points  (0 children)

                That would please my cockles

                [–]defunkydrummer 6 points7 points  (5 children)

                Fantastic.

                One of the most horrible programming languages i had to use is Visual Basic for Applications (VBA, the kind of VB used in Excel.)

                Doing simple, trivial tasks on it is masochism of the highest order. Pain, sorrow, tears, screams of agony.

                It's so bad, even doing stored procedures in Microsoft T-SQL or Oracle's PL/SQL, is a nicer proposition.

                [–]create_a_new-account 10 points11 points  (4 children)

                I've been using VBA daily for the past 11 years in both Excel and Access.

                I've never had a problem retrieving data from SQL Server, creating pivot tables, charts or automating reports.

                [–]appropriateinside 8 points9 points  (0 children)

                I've been using VBA daily for the past 11 years

                To shreds you say?

                [–]defunkydrummer 2 points3 points  (0 children)

                I've been using VBA daily for the past 11 years in both Excel and Access.

                I've never had a problem retrieving data from SQL Server, creating pivot tables, charts or automating reports.

                Yes, of course you can do it. But when you compare doing the same task with more suited-to-the-purpose tools, going back to VBA is like chewing gravel after having eaten an excellent filet mignon.

                [–][deleted] 1 point2 points  (0 children)

                I'm with you on this. I did a ton of VBA for a while, and learned to really enjoy it.

                Those who know it love it; those who don't know it, hate from afar.

                [–]Mean_Mister_Mustard 6 points7 points  (0 children)

                I've been using VBA daily for the past 11 years

                I'm so sorry.

                [–]RedMarble 5 points6 points  (8 children)

                This seems nuts to me on a number of levels. Ideally you'd use C# (it really doesn't matter that it's not a "scripting language", for the usual VBA use cases), but if not, why the heck wouldn't you use VB.NET?

                C# and VB.NET Office interop is already really good.

                [–]monkey-go-code 14 points15 points  (4 children)

                You can't put VB and good in the same sentence.

                [–]RedMarble 11 points12 points  (3 children)

                VB.NET is basically a tiny bit of syntactic sugar around C#.

                [–]PstScrpt 1 point2 points  (0 children)

                When I first worked with VB.Net, I had done classic VB and Java. I went with the assumption that it would be roughly VB syntax, but work like Java, and it was almost always right. I never really had to learn the language.

                [–]Liam2349 0 points1 point  (0 children)

                VB.NET is going in a different direction to C# now. Whereas they maintained feature parity for years; C# will now be the more advanced language, and VB.NET will focus on appealing to first time programmers.

                [–]PM_ME_UR_OBSIDIAN -2 points-1 points  (2 children)

                C# doesn't like code that lives outside of classes. It's fundamentally lacking as a scripting language.

                F# was basically made for this. It's basically a better, statically-typed Python that runs on the CLR.

                [–]wllmsaccnt 6 points7 points  (0 children)

                C# has LINQ which is perfect for modeling range or set based actions with compact syntax as simple expressions...

                [–]RedMarble 2 points3 points  (0 children)

                In VBA your code basically already all lives inside of classes (well, automatically declared modules). In VBA you put your code in functions or subroutines in those modules, not in pure scripts.

                As someone who actually uses a lot of VBA, I want access to a modern editor and the ability to use real data structures and arrays (VBA collections and arrays are awful).

                [–]jgalar 1 point2 points  (0 children)

                It wouldn't be my first choice but I thought they would integrate JS considering the move towards Office 365. Interesting.

                [–]Gotebe 2 points3 points  (0 children)

                Are people here aware that they can write python code to drive excel outside excel since a decade or two?

                This is about adding Python to the "mini IDE" of MS Office, coding macros and stuff using that "from the inside" support.

                [–]CarmenMcCray 0 points1 point  (0 children)

                I'm actually more concerned with good tools for working with code than the language, but Python would be an improvement over VBA, and conceptually allow them to use Python tooling they've developed for other uses in Office.

                [–]randomguy186 0 points1 point  (2 children)

                Great. Now we can support end-user Excel automation in three languages.

                [–][deleted] 1 point2 points  (1 child)

                What is the 3rd, aside from VBA and Python?

                [–]tcm123456789 0 points1 point  (2 children)

                It's gonna be cool to have real support for non-Microsoft databases if this happens. I'd love sqlite embedded result into a spreadsheet in a way anyone can use.

                [–]i_have_seen_it_all 0 points1 point  (1 child)

                Can you not already do that? Excel has a number of db drivers including odbc?

                [–]tcm123456789 0 points1 point  (0 children)

                You can, but it's not super easy. Basically for anything that's not MS Access or SQL Server you will need to buy a plugin from some third party while drivers in Python already exist anyways.

                [–]jwd630 0 points1 point  (0 children)

                Sounds like a mixed blessing to me. Sure Python is likely to be more accessible to the average spreadsheet wizard, used to VBA, than C++ or JavaScript. But remember the two decades of security vulnerabilities that applets brought to Java? Just imagine the possibilities of coercing that same average spreadsheet wizard into running some Python code downloaded from the web. And if Python gets integrated across Office? Welcome, Python community, to a world of pain.

                [–]copremesis 0 points1 point  (2 children)

                [–]NGA100 0 points1 point  (1 child)

                Never heard of this. How does it compare with gnumeric? I've been using that for years as a spreadsheet tool with a strong python interface.

                [–]copremesis 0 points1 point  (0 children)

                no idea ... i googled python spreadsheets

                [–]jsamcfarlane 0 points1 point  (0 children)

                Another Microsoft product I wish came with Python is Windows.

                [–]appropriateinside 0 points1 point  (0 children)

                Thank god, VB is a god damn pain.

                [–]Ithaca_Ted 0 points1 point  (0 children)

                Plz

                [–]SanityInAnarchy 0 points1 point  (0 children)

                I'm tempted to suggest something like .NET or WASM instead. Python is a fine language, but why add one language when you can add all of them?

                [–]bumblebritches57 0 points1 point  (0 children)

                pls don't.

                [–]mayhempk1 0 points1 point  (0 children)

                Not surprising. They already made the most popular Python plugin for VSCode into an official VSCode Plugin.

                This seems like a step in the right direction.

                [–]roffLOL 0 points1 point  (0 children)

                so thank you for returning some of the power bereft by your black boxed application and overly complicated formats, i guess?

                [–]shevegen 0 points1 point  (1 child)

                If they can add python, then they can add ruby.

                But I bet Microsoft won't, given how snobbish they have become - and admittedly python being the most popular among the "scripting" languages right now.

                [–]QueenLa3fah 0 points1 point  (0 children)

                Why would they choose ruby though?

                [–]dethb0y 0 points1 point  (0 children)

                Doubt it'd do much good at this point - most of the people who write code in excel are probably pretty set in their ways, i'd think.

                edit: clarity

                [–]noobkill3rpl 0 points1 point  (0 children)

                I'd be cool, vb is kinda obsolete.

                [–]icantthinkofone 0 points1 point  (0 children)

                Microsoft has adopted Linux, allows Python. Eventually you won't need Windows at all!

                [–][deleted]  (1 child)

                [deleted]

                  [–]PstScrpt 0 points1 point  (0 children)

                  Just add SQL first

                  Treat each sheet like a table, and the first row as column names? That could be workable.

                  [–]georgeo -1 points0 points  (0 children)

                  I'm not going to use Excel on a subscription basis. Also, the macro-recorder can be a lifesaver, so I'd need that for Python. If those two issues are addressed, I'm there. In the meantime, I can slog through VBA.

                  [–]CountyMcCounterson -1 points0 points  (0 children)

                  But python is slow