Quantitative Analysis
Parallel Processing
Numerical Analysis
C++ Multithreading
Python for Excel
Python Utilities
Services
Author

I. Motivation and design (PFE).
II. Installation of the Python for Excel.
III. Tutorial introduction into the Python for Excel.
1. Stability guarantee.
2. PythonForExcel ControlShell.
3. What to do if the connection to Excel from the ControlShell is lost or if the prompt "waits" for too long.
4. Possible littering of memory with orphaned Excel processes.
5. In-cell execution of Python statements.
6. Calling Python from VBA.
7. Calling VBA from Python.
8. Debugging with Python for Excel.
9. Unicode support.
10. Deactivation of Python for Excel.
11. Very important note about pfe-script execution.
IV. PFE Programmer's reference.
Index. Contents.

In-cell execution of Python statements.


tart a fresh instance of Excel and put =pfeEval("a") in any cell.


Figure

The ControlShell instantly pops up with the following message.


Figure

Such result is exactly the same as if one would type eval("a") in the addin shell.

Let us now give a value to the variable "a" in the addin shell. Press <Ctrl>+<Enter> to switch to the addin shell and give the variable "a" a value as shown on the picture.


Figure

Select the range a1:c3 in the Excel and type =pfeEval("a") <Ctrl>+<Shift>+<Enter>. There result is shown below.


Figure

The Python function eval and in-cell function pfeEval cannot evaluate assignments. For this reason the function pfeCmd is provided. pfeCmd evaluates any expression but does not return a value.





Index. Contents.


















Copyright 2007