Limits of Python implementation in Excel 365

Anonymous
2024-01-31T08:22:15+00:00

Hi all, we are testing the beta feature of Python in Excel 365. It appears that the python code is running on servers in Azure. So there is no local python running on my PC. I have been trying to use python code to connect to SQL DB, but i get odbc connection errors related to not being able to load the odbc driver even though it is there on the local PC.

Can anyone clarify the python features that are available to use in Excel 365? Is python code limited to only making calculations and functions within the current excel sheet. Or can it make external connections from the local PC to a databases?

Thanks,

Nick.

Microsoft 365 Insider | Excel | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

3 answers

Sort by: Most helpful
  1. Anonymous
    2024-01-31T14:30:46+00:00

    Hello Nick,

    Thank you for posting in Microsoft Community.

    We appreciate your interest in using Python in Excel!

    I understand that you have some questions about the Python implementation in Excel. I'd be happy to help.

    Firstly, I'd like to inform you that Python implementation in Excel has some limitations. Python does not have access to your computer, devices, or account. It only returns output to your workbooks through the =PY() Excel function, which displays the result of the Python code in the cell where the function is entered.

    Additionally, Python functions cannot return other object types like macros, VBA code, or other formulas. This means that the Python code cannot access or modify other properties in the workbook, such as formulas, charts, PivotTables, macros, or VBA code.

    Feel free to check more details here:

    Data security and Python in Excel - Microsoft Support

    Open-source libraries and Python in Excel - Microsoft Support

    Get started with Python in Excel - Microsoft Support

    I hope this information helps. If you have any further questions or concerns, please don't hesitate to ask.

    Sincerely,

    Kathy A.

    Microsoft Community Moderator

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2024-02-14T12:45:29+00:00

    Thanks for your information, Kathy. I believe it will still be a useful tool for us. Do you have any recommendations on how to use an SQL DB with Excel to save and load data? I have looked at a few plugins, and it looks like Excel has some built in function for SQL. I'm sure we can find a way to achieve our goal.

    Thanks,

    Nick.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2024-02-13T21:46:38+00:00

    Good day!

    We haven't heard from you, so we assume that your issue has already been addressed. We will not be monitoring this thread moving forward so, if you need further assistance, please create a new thread to discuss these concerns by clicking this link: Create a new question (microsoft.com).

    Thank you for your understanding.

    Respectfully,

    Kathy A.

    Microsoft Community Moderator

    Was this answer helpful?

    0 comments No comments