Summary
In this chapter, you have learned ways to call R and Python from Excel instead of the other way around to empower your end users even further. We have covered the reasons for doing so and two very different approaches: calling R and Python locally and via an API endpoint.
For locally calling R and Python, we covered BERT
and xlwings
in detail, from setting up and testing the environment via creating R and Python solutions up to and including how to call those solutions from Excel using the various methods provided by BERT
and xlwings
, such as VBA code and UDFs.
Next, you learned about API endpoints and the benefits of using an API endpoint to connect Python and R to Excel. We discussed the pros and cons of such a setup and then delved into the two flavors of API hosting: open source tools and commercial solutions. We have covered the two most used open source setups: plumber for R and FastAPI for Python. Finally, we had a look at commercial solutions for hosting R and...