How to use Excel with Python (p.1)

Опубликовано: 21 Февраль 2025
на канале: John Starfire
208
1

We ca finally use Python into Excel directly, so let's start using it. This is avaiable into the Microsoft 365 insider beta channel for the moment. Write =py into a cell and then press TAB and you can start writing your code or press the python icon in the formulas tab of the Excel menu. You can run the script pressin ctrl+enter. To see the values you can use print, but you will see the result into the diagnostic panel only (activable pressing diagnostic near the python icon in the formulas tab). To see the values in the cells, do not use print, but just write the variable you want to get into the cells (if you separate them with a comma you will see them one under the other in different cells) and then go in the little arrow near the py text of the formulas on green background and choose excel values instead of python object, pressi ctrl+enter and you will get them. You can also create another python cell where you write the variable name and you will get the value.

https://pythonprogramming.altervista....