Share via

Python in Excel

Michele Black 0 Reputation points
2026-06-03T19:14:44.6266667+00:00

Where do I find Python in Excel? I want to use it for QR code.

Microsoft 365 and Office | Excel | For home | Windows
0 comments No comments

2 answers

Sort by: Most helpful
  1. Rin-L 20,855 Reputation points Microsoft External Staff Moderator
    2026-06-04T14:35:34.95+00:00

    Hi @Michele Black,

    You can access Python directly within Excel by going to the Formulas tab and selecting Insert Python. Another quick way is to simply type =PY( into a cell, which will activate Python functionality right away.

    User's image

    I recommend reviewing the following documentation to better understand which platforms support this feature based on your subscription: Python in Excel availability - Microsoft Support 

    User's image

    Note: Python in Excel is currently not supported on mobile platforms, including Excel on iPad, iPhone, and Android devices

    You may also find this article helpful: Get started with Python in Excel - Microsoft Support

    Thank you very much for your time.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.  

    Was this answer helpful?

    0 comments No comments

  2. AI answer

    2026-06-03T19:14:56.45+00:00

    Python in Excel is built into Excel for Microsoft 365 (Windows, Mac, and web) and runs in the Microsoft cloud. It is not available on Excel for iPad, iPhone, or Android.

    To find and enable Python in Excel on Windows desktop:

    1. Open Excel and create a blank workbook.
    2. On the ribbon, go to Formulas.
    3. Select Insert Python.
      • Alternatively, click in a cell, type =PY, and choose PY from the AutoComplete list.

    Once Python is enabled, Python formulas can be used in cells to run Python code, including code that uses the built-in qrcode library (provided via Anaconda) to generate QR codes as images.

    Note that Python in Excel requires an internet connection because calculations run in the Microsoft cloud.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.