Skip to content

calling user environment variables from xlwings script #95

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
notacoat opened this issue Oct 22, 2014 · 2 comments
Closed

calling user environment variables from xlwings script #95

notacoat opened this issue Oct 22, 2014 · 2 comments
Labels
Milestone

Comments

@notacoat
Copy link

Cannot load variables from my bash profile. This works in python outside of xlwings.

syntax I'm using is

'user': os.environ['USERNAME']
'passwd': os.environ['PASSWORD']

@fzumstein fzumstein added the bug label Oct 22, 2014
@fzumstein
Copy link
Member

yes, that's right - from Excel it calls python in the terminal directly without loading your bash_profile. Let me think about a solution/workaround...

@fzumstein fzumstein added this to the v0.2.4 milestone Oct 23, 2014
@fzumstein
Copy link
Member

Great catch! This is resolved now and will be included in the next release - if you want it now, just replace the VBA module with this here: https://github.com/ZoomerAnalytics/xlwings/blob/master/xlwings/xlwings.bas

This change also means that the default path from .bash_profile is now finally used as interpreter on Mac if PYTHON_MAC = "".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants