Feb 17 2024 06:13 AM
So hello everyone.
I started learning python, and its going good.
However there is discrepancy / difference between options for python and for python in excel (i.e. = PY() function.
So I tried to do this in Python:
import os
os.getlogin()
or other codes from the web to get desktop path as string. and inside the Visual studio code it works (all of them)
however when i copy that code into the =PY() function they stop working and I'm getting errors.
So my question is:
what Python code I can use to get desktop path and/or windows username inside the =PY() such that it will display as text the result?
Feb 17 2024 07:12 AM
To my knowledge Python in Excel accepts any Excel objects which are within opened file; code itself is run on the Microsoft cloud; thus it has no idea about your environment which is outside opened file.
Feb 17 2024 07:17 AM