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

Python as an Excel scripting language

Let us do scripting with Python! Yay! Not only as an alternative to VBA, but also as an alternative to field functions (=SUM(A1:A2))

3,797 votes
Sign in
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)

    We’ll send you updates on this idea

    Daniel shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →
    info needed  ·  AdminExcel Team [MSFT] (Admin, responded  · 

    Hi folks –

    Thanks for the continued passion around this topic.

    We’d like to gather more information to help us better understand the needs around Excel and Python integration.

    To help us with this, can you please complete the survey below?

    Ashvini Sharma
    Lead Program Manager
    Microsoft Excel


    Sign in
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      • Anonymous commented  ·   ·  Flag as inappropriate

        The Data science community will surely benefit tremendously from adding Python to Excel

      • Zlatan commented  ·   ·  Flag as inappropriate

        Whaaaaaaat are you waiting for? Python should have been integrated years ago. I checked this page earlier today and you still haven't done it? Get to work now.

        Don't listen to anti-Python FUD. From non-programmers perspective Python is the easiest language to learn how to read and write.

        Most Excel users are not developers and non-developers are people that don't want complicated and hard.

        Most businesses don't have developers working full time writing code. Especially small and medium sized businesses. They have people like accountants. They have people that are trained in business not programming.

        And DO NOT integrate JavaScript. It's only getting harder to read and write. When i attempted learning to code I made a mistake of starting with JavaScript. Python is what helped me learn basics.

        Python already has many tools for this job. It's been true and tested in business for years. None of this JavaScript nonsense.

      • Stefan Holmes commented  ·   ·  Flag as inappropriate

        Go further. Integrate VS Code as the Alt+F11 editor and provide Python integration across the entire Office suite.

        I know there is a workflow for serious Office automation via Visual Studio and add-ins. Sometimes, scripting is the only way to get something done.

      • Guzman commented  ·   ·  Flag as inappropriate

        Python !!! Please, Python!!
        It has the best libraries, it's easy to leran, specially for non IT people like myself.

      • Concerned Architect commented  ·   ·  Flag as inappropriate

        Python really?? Yuck. Nasty. A language that should have died long ago. Now JavaScript would be a welcome addition and is only gaining popularity. Python is popular because it's the only thing a CS grad proficient in by the time they leave school. Let's do everything in Python! Yay! I would opt for an extensible framework to add a custom language interpreter to Excel and let the Python community implement it as could the JavaScript and R communities do respectively.

      • ryan kauffman commented  ·   ·  Flag as inappropriate

        As a passionate devotee and heavy user of VBA, nothing would make me happier than to integrate Python into Excel!!

      • TP commented  ·   ·  Flag as inappropriate

        If it allows for the integration of python libraries, the business case for this would be very strong. It would allow for the construction of simple spreadsheet interfaces that can tap numpy, scipy, tensorflow, etc. and yet remain understandable to the user.

      • Anonymous commented  ·   ·  Flag as inappropriate

        Agree with everything that was said here ... for R. Include Microsoft R Open into Office installation and benefit Excel, PowerBI and eventually SQL Server

      • pascal bellerose commented  ·   ·  Flag as inappropriate

        I don't get why excel should integrate Python. Better coverage of features using vba would be a better approach I think.
        Just changing the way external data requests have changed over time have caused a great deal of disruption in the end-user community.
        Integration of Python scripts seems more complicated than integration of R which is already present in PowerBI.

        If you want Python simply because you don't want to learn another language, maybe it means you are no longer a computer geek (if you ever been one) and you should find another job.

      • Anonymous commented  ·   ·  Flag as inappropriate

        Having done a fair bit of automation work with Python on Excel in the past, here are some feature suggestions:

        1. Make sure the API metadata is available through the standard python reflection capabilities. With Activestate you had to generate a wrapper to make this work well. Using reflection with Python is a good way to figure out how to use COM APIs if you can read the type lib.

        2. Make sure that ranges and selections play nicely with native Python arrays.

        3. Make sure you handle variants properly, especially APIs like the pivot table metadata that makes extensive use of variant arrays.

        4. Ensure that you can do database access from Python, for example through odbc. This is a lot more useful than you think.

        5. A facility that could use the python generator or some similar mechanism as a data source for a pivot table would be a win. In fact, making powerpivot scriptable through Python would be an even bigger win.

        6. Python support for writing deployable apps on top of MS Access would be a bigger win still. Again, make sure you support at least odbc (or ADO.Net if you go down the route of a .Net hosted Python) for programmatic database access.

        7. If you go down the .Net route, make Winforms (or maybe WPF) available to the package.

        8. Similarly, numpy/scipy.

        9. We're aware that you have a legacy API but Array indexes start at 0. Think of this W.R.T. wrapping APIs in the array as Python sequences.

        That's a starter for 10.

      • Christopher Rath commented  ·   ·  Flag as inappropriate

        Please do NOT add Python scripting. If you're going to add something alongside VBA then please use your limited resources on a language that does not treat whites space (indentation) as significant.

      • George commented  ·   ·  Flag as inappropriate

        Having just slapped together a script in Javascript to extract and reformat some data from workbooks, I must say that I'd have sooner done it in Python, and would have done it in Python had I not had to install it on the server.

      • Jeff Kriske commented  ·   ·  Flag as inappropriate

        This would be fantastic. It'd be even better if I could use it on Excel installed natively on Linux...

      ← Previous 1 3 4 5 14 15

      Feedback and Knowledge Base