1. 21
    1. 3

      What could possibly go wrong? Python and Excel?

      1. 11

        Python is a very long way away from being my least favourite programming language but the Calc language in Excel is far worse in just about every possible way. The nice thing about this project (which actually started with people a couple of doors down from my office several years ago) is not that it’s plugging Python into Excel, it’s that it’s decoupling the Excel data model and UI from the underlying programming language. This should make it easier to plug in other language including some future hypothetical designed-for-spreadsheets-but-not-awful programming language.

        1. 6

          What could go wrong? Really this sounds amazing tbh…

          1. 3

            More people using Excel for task for which they shouldn‘t. Excel has limitations:

            • You can‘t version control Excel files
            • You can‘t test algorithms written in Excel
            • You can‘t separate the data from the algorithm

            … or it is really hard or nobody does it. Excel is good for some cases and I use it for those, but Excel is probably the most overused software, because it is just there.

            1. 9

              It’s also one of the most powerful interactive declarative information processing environments available to non-programmers.

              I assume MSFT is aiming at ChatGPT code generation for Python to be used by non-programmers to take things further in Excel. Keep fire extinguishers within reach.

              You version control Excel files in OneDrive and Dropbox. The algorithms are tested manually by inspecting the output, just like how many programmers do printf-driven testing. Is it best engineering practice? Of course not.

              Is something better available to non-programmers short of grovelling in front of the IT dept managers?

              1. 1

                Is something better available to non-programmers short of grovelling in front of the IT dept managers?

                Apple Automator, though I suspect it fills largely different use cases. Also only available on macOS, of course.

              2. 2

                To yes and this too, have you ever had to write an “if then” in Excel longer than one decision tree? My eyes bleed, trying to figure out where to put the commas or parentheses.

                I look forward to an IDE text box that does actual spacing and highlighting per conditionals. I only see this as a positive, and frankly a direct challenge to the jupyter notebook ecosystem.

                1. 1

                  You can‘t version control Excel files

                  Kind of. You can version control an Excel file, you can’t version control Excel files. Excel files include version control that integrates with OneDrive / Sharepoint so you can go back to old versions easily. Unfortunately, Excel lets you reference data in other sheets. This is why it doesn’t let you open two files with the same name at the same time: it would make cross-spreadsheet references non-unique. This means that you might actually need to version control multiple sheets simultaneously.

                  It’s worth noting that, if you have track-changes enabled, all of the Office tools can perform merging and git can delegate merging to external tools. I’ve never done this personally, but I’ve seen other people set it up so that git can merge MS Office documents automatically by invoking the merge functionality in Office whenever it needs to merge two versions of an Office doc. This does mean that you end up storing multiple versions of the history, but if you’re using Office then I’m assuming a few MiBs of wasted space is probably not important to you.

                2. 2

                  Python in Excel runs on the Microsoft Cloud with enterprise-level security as an M365 connected experience.

                  What could go wrong indeed …?

              3. 1

                Does it allow to use Python in a standalone Excel?

                For example, I go to office 365, find my xls file in OneDrive, click ‘Open in App’ (or download then open in Excel app) – will I be able to use python?

                This means 2 things to me - if the standalone Excel now supports python:

                a) the Excel .exe has a built-in python,

                b) and the XLS format now can store textual and pre-compiled python

                1. [Comment removed by author]