Forum Discussion
RadoslawPoprawski
Feb 17, 2024Copper Contributor
=PY() in excel to return desktop path or at least windows username.
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 ...
SergeiBaklan
Feb 17, 2024MVP
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.
- RadoslawPoprawskiFeb 17, 2024Copper Contributorstill im experimenting.
I tried this in VSC :
import os
def get_path():
PATH = os.getlogin()
return PATH
print(get_path)
and yet im getting this error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'get_path' is not defined