Forum Discussion
Using Custom Python Libraries in Excel or PowerBI
- Anonymous2 years ago
Hi, rnambiar
Thanks for the reply from Kedar_Pande , please allow me to provide addition:
Excel now supports Python integration, allowing you to use Python directly in Excel cells. However, this feature is limited to some built-in libraries. You can use the =PY function to write Python code in Excel cells, but custom libraries still need to be preprocessed outside of Excel. You can check the following link:
Open-source libraries and Python in Excel - Microsoft Support
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
rnambiar ,
In Power BI, you can use built-in Python libraries like pandas and numpy. However, you cannot install custom libraries directly via pip or conda.
Workaround- Use another Python environment to preprocess data with your custom library, then export it (e.g., CSV) and import it into Power BI.
To use Python in Power BI go to Transform Data > Run Python Script.
If this helped, a Kudos 👍 or Solution mark would be great!
Cheers,
Kedar Pande
www.linkedin.com/in/kedar-pande
Thank you. That works with Power BI. Is there a way to accomplish the same in excel without having to go outside of excel to preprocess the data. I'd like to be able to share this file with other users who dont use Python.
- Kedar_Pande2 years ago
Super User
Sorry, I am not an expert in Excel.
If this helped, a Kudos 👍 or Solution mark would be great!
- Anonymous2 years agoNot applicable
Hi, rnambiar
Thanks for the reply from Kedar_Pande , please allow me to provide addition:
Excel now supports Python integration, allowing you to use Python directly in Excel cells. However, this feature is limited to some built-in libraries. You can use the =PY function to write Python code in Excel cells, but custom libraries still need to be preprocessed outside of Excel. You can check the following link:
Open-source libraries and Python in Excel - Microsoft Support
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.