Feedback by UserVoice

How can we improve Excel for Windows (Desktop Application)?

DON'T use Python as an Excel scripting language

DO NOT let us do scripting with Python! Yay!

9 votes
Sign in
(thinking…)
Sign in with: Facebook Google
Signed in as (Sign out)

We’ll send you updates on this idea

Andrew Jackson shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

13 comments

Sign in
(thinking…)
Sign in with: Facebook Google
Signed in as (Sign out)
Submitting...
An error occurred while saving the comment
  • Kalle Arulaane commented  ·   ·  Flag as inappropriate

    Totally disagree. Python would be wonderful compared to VBA or in addition to VBA.
    VBA is outdated, clumsy and not used anywhere but Excel scripting.

  • Matt commented  ·   ·  Flag as inappropriate

    The fragmentation that exists in the Python community already does not lend itself to the long-term stability that is needed in the Office family.

    At least if you're going to incorporate some newer technology into office, go with .net

    This is a platform you own, and the transition from VBA->VB.net will be quite smooth (this was, after all, the path you created!)

    This also allows for the transition from Ace/Jet -> SQL server in terms of database support

  • Matty commented  ·   ·  Flag as inappropriate

    Use PowerShell, it is built into Windows already. Build a Domain Specific Language in PowerShell Dedicated to Excel. Retain the core of PowerShell and add the needed cmdlets that are Excel specific.
    Or provide excel with a way to call any language of your choice with a scripting api. Make the first two languages python and PowerShell. Other languages can then be added and you can use whatever good or bad language choice you wish depending what you consider to be good or bad.

  • Michael K. Hunter commented  ·   ·  Flag as inappropriate

    Javascript is a soup of curly braces and parentheses. Python is very clear to read and flexible to use. I disagree with this post. Please go with scripting in Python.

  • balakrishna sappa commented  ·   ·  Flag as inappropriate

    Unlike JavaScript, Python is not a web standard, so Python shouldn't be introduced as another language for Excel Scripting. Moreover, VBA which is a non-web standard programming language, is already there for the purpose.

  • balakrishna sappa commented  ·   ·  Flag as inappropriate

    Excel has got -
    Power Query for advanced data manipulation
    Power Pivot for BI data modeling
    Power View for Visualization
    JavaScript for Scripting

    R can be introduced first for advanced data analysis (which Python is also good at) and advanced visualization.

    Where else can Python add value to Excel?

    If at all Python is to be introduced into Excel, it can be only for its huge community.

    I careful analysis is needed before introduction of Python because once introduced, it will have to be supported.

    A simple example - today VBA still couldn't be got ridden off of Excel.

  • Ryan commented  ·   ·  Flag as inappropriate

    Python doesn't need to be integrated into Excel like VBA, but it would be nice to be able to interface with Excel like a database for data crunching/parsing data outside of Excel. I have countless uses for pushing data into and out of Excel for automating report generation, database import/exports and many other things.

    Python has tons of tools available to crunch data that are not available in VBA. How do I export to a Sqlite database from Excel using VBA? There are some hacky ways to do it, but nothing as simple as doing it with a language that has the tools already built in.

    I typically use XLRD or others, but there are so many xls formats that I occasionally run into formats that can't be read by an existing Python library (.xlsb!!). Also Excel formatting get screwed up often when using these tools when trying to write to a document. Having a proper Python Library that isn't a hack to interface to all of the Excel document formats would be very valuable and expand Excel into many other uses where a database isn't quite justified/doable.

  • Zev Spitz commented  ·   ·  Flag as inappropriate

    @Vogel612

    1,3) Python can access the same COM API as VBA can, via win32com.

    2) Whatever version of Python is installed on the user's system, with an option in the Office options dialog to specify the path to the Python interpreter. Presumably the first time a user tries to open a file with embedded Python code, or execute a Python script, Excel (or whatever application) would prompt for the location of the interpreter.

    4) I think the primary benefit of Python-as-an-embedded-scripting-language is not in performance, but rather in the higher-level abstractions. Specifically, because Python has a function-as-first-class-object mechanism, it enables a more succinct style of data processing (think LINQ).

  • Tomasz Truszczyński commented  ·   ·  Flag as inappropriate

    I agree, on the reason it's waste of human resources. Python as a second programming language sounds good but as for now I don't see its critical advantages over VB. I'm pretty sure there are more interesting and/or important suggestions for many Excel users.

  • Vogel612 commented  ·   ·  Flag as inappropriate

    @Kenneth let's start with the problem that EXCEL is intertwined with COM. Any additional support is bound to be a "screwed on" type of thing, unless it involves substantial changes within large parts of EXCEL

    Next up let's talk about python's problems. Which version of Python should be used?
    Thirdly there's the problem of the extensive interop and COM API that already exists for vba (and not quite so extensively for) other .NET-based languages.

    In addition python's inherent single-threading provides no real added benefit over VBA. Let's not forget the fact that VBA will have to still be supported for the next few decades, because millions of businesses rely on it. Then add in the madness that is localization. Do I actually have to remind you that EXCEL's functions are available in a few hundred languages natively?

    Oh and let's please get started on how python is better because it's easier to learn... It isn't. It's just different. VBA has it's flaws, but that doesn't mean it has no place in Programming (or Business)

    Do I need to continue?

Feedback and Knowledge Base