Show Console: Check the box in the ribbon or set the config to TRUE if you want the command prompt to pop up. Restart UDF Server: This restarts the UDF Server/Python interpreter. Interpreter doesn’t shut down after each call. RunPython: Use UDF Server: Uses the same COM Server for RunPython as for UDFs. py.ĭebug UDFs: Check this box if you want to run the xlwings COM server manually for debugging, see Debugging. The default imports a file in the same directory as the Excel spreadsheet with the same name but ending in. py extension) from which the UDFs are being imported.Įxample: UDF_MODULES = "common_udfs myproject" UDF Modules: Names of Python modules (without. baseįor the base installation or myenv for a conda env with the name myenv. You also need to set Conda Env, see next point.Ĭonda Env: If you are on Windows and use Anaconda or Miniconda, type here the name of your conda env, e.g. C:\Users\Username\Miniconda3 or %USERPROFILE%\Anaconda. PYTHONPATH: If the source file of your code is not found, add the path to its directory here.Ĭonda Path: If you are on Windows and use Anaconda or Miniconda, then type here the path to your This is stored as Interpreter_Win or Interpreter_Mac, respectively, see below! If you use conda envs on Windows, then leave this empty and use Conda Path and Conda Env below instead. This works also with virtual or conda envs on Mac. Interpreter: This is the path to the Python interpreter. For fine-tuning, here are the available settings: When you install the add-in for the first time, it will get auto-configured and therefore, a quickstart project should work out of the box. Note that when you create a workbook via xlwings quickstart, the reference should already be set. Then, to use RunPython or UDFs in a workbook, you need to set a reference to xlwings in the VBA editor, see screenshot (Windows: Tools > References., Mac: it’s on the lower left corner of the VBA editor). Technically, this copies the add-in from Python’s installation directory to Excel’s XLSTART folder.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |