Microsoft is bringing popular programming language Python to Excel. A public preview of the feature is available today, allowing Excel users to manipulate and analyze data from Python.

You won’t need to install any additional software or set up an add-on to access the functionality, as Python integration in Excel will be part of Excel’s built-in connectors and Power Query. Microsoft is also adding a new PY function that allows Python data to be exposed within the grid of an Excel spreadsheet. Through a partnership with Anaconda, an enterprise Python repository, popular Python libraries like pandas, statsmodels, and Matplotlib will be available in Excel.

  • rhymepurple
    link
    fedilink
    English
    arrow-up
    1
    ·
    11 months ago

    I don’t know all the details, but is there anything that you couldn’t do with dynamic array formulas, Power Query, or VBA? While Power Query requires the data to be formatted as an Excel table (or, recently, as a dynamic array output), both dynamic array formulas and VBA can can data from noncontinuous regions and convert it to a single, continuous data region. All of these tools can achieve tasks such as sorting rows, filtering rows, reordering columns, removing columns, etc.

    Alternatively, why couldn’t this be done in Python (without Excel)? Any Excel formula used to manipulate the data can be accomplished in Python. Additionally, having it in Python (outside of Excel) may help you further automate your process by doing the SAP Database Export and enter the data into your CMS.

    • THED4NIEL@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      11 months ago

      Sorry for the late reply.

      Yes, it would be possible to an extent, though it is very slow to create a construct like that and is barely maintainable. Formulas don’t scale well with complexity and Power Query sometimes break with different table sizes (horizontally)

      Alternatively, why couldn’t this be done in Python (without Excel)?

      I also considered this.

      Create a template, fill it with formulas and templates and let a Python script handle all data manipulation via Pandas from outside of Excel, then save.

      The downside of this you need proficient users to handle the script and pip packages, while many people in my field know how to use Excel.

      I don’t know the most effective way yet, but I’ll keep my options in mind.

      Automatically feeding the data to the CMS was proven to be difficult, they are designed in a way that doesn’t take into account manipulation by other programs and not seldom breaks the program.