Accessing XLSX files from pyrevit

Finally, I’ve succeeded to make possible the use of third party python modules.
Thanks to this thread.

https://forums.autodesk.com/t5/revit-api-forum/how-to-use-python-3-libraries-through-pyrevit/td-p/10173809

I will try to explain the procedure for who need it:

  • In fact, since pyrevit 4.7 version, it’s possible to use CPython instead of IronPython, letting us to use more common modules that are not compatible with IronPython. To do that, we have to force the script to use CPython by adding this line:

#! python3

at the first line of the script.

  • More over, we have to add on windows system variable environment, the key PYTHONPATH pointing to the site-packages folder of your CPython version installed. This key can be added through advanced parameter manager:


    A restart ow windows should be done to make this setting effective.

  • Be aware that the imported module is compatible with the version installed in the package of pyRevit and have the same revision. for example 3.8.* or 3.7.*

That’s all. Hope it helps.

7 Likes