PyXLL exposes certain functions from the Excel C API. These mostly should only be called from a worksheet, menu or macro functions, and some should only be called from macro-sheet equivalent functions [1].
Functions that can only be called from a macro or menu can be called from elsewhere using
schedule_call
. This allows these C API functions to be called as schedule_call
schedules a function call on Excel’s main thread and in a macro context.
volatile (bool) – boolean indicating whether the calling function is volatile or not.
Usually it is better to declare a function as volatile via the xl_func
decorator.
This function can be used to make a function behave as a volatile or non-volatile function
regardless of how it was declared, which can be useful in some cases.
Callable from a macro equivalent function only [1]
Pops up an alert window.
Callable from a macro or menu function only [2]
alert (string) – text to display
set the calculation type to automatic or manual.
Callable from a macro or menu function only [2]
calc_type (int) –
xlCalculationAutomatic
or xlCalculationSemiAutomatic
or xlCalculationManual
recalculate all cells that have been marked as dirty (i.e. have dependencies that have changed) or that are volatile functions.
Equivalent to pressing F9.
Callable from a macro or menu function only [2]
recalculate all cells that have been marked as dirty (i.e. have dependencies that have changed) or that are volatile functions for the current worksheet only
Callable from a macro or menu function only [2]
Used by asynchronous functions to return the result to Excel see Asynchronous Functions
This function can be called from any thread and doesn’t have to be from a macro sheet equivalent function
handle (object) – async handle passed to the worksheet function
value (object) – value to return to Excel
Yields the processor to other tasks in the system and checks whether the user has pressed ESC to cancel a macro or workbook recalculation.
retain (bool) – If False and a break condition has been set it is reset, otherwise don’t change the break condition.
True if the user has pressed ESC, False otherwise.
sheet name from a sheet id (as returned by xlSheetId
or XLCell.sheet_id
).
arg_num (int) – number from 1 to 88 specifying the type of document information to return
name (string) – sheet or workbook name
depends on arg_num
Footnotes