Similar to Python’s philosophy, the focus of xlwings is on convenience rather than speed. Nevertheless, there are a few things that you can tweak to improve performance. See the video: https://www.youtube.com/watch?v=a9M0Xt0t9No
5. Minimize Cross Border Calls
• Use arrays (both in scriptsand UDFs)
– Nested lists, NumPy arrays, pandas DataFrames
• A goodworkflow is:
– read the data
– do the magic in Python
– write the results back
5
9. Use UDF Server
• Keeps Python sessionalive
• UsingRunPythonwill make it cross-platformcompatible,butyouneed to
”Restart UDF server” after each code change
• Windows-only:Use @xw.subdecorator andImport Subs like you import
UDFs
9