User-defined functions

SpreadsheetConverter does not support Excel macros, but you can manually convert your macros to JavaScript and use them in the converted web page.

SpreadsheetConverter supports Excel formulas and about 300 Excel functions. Macros written in Visual Basic for Applications (VBA) are not automatically converted and included with the web page.

However, if you can translate these functions to JavaScript yourself, the generated code can call them.

In the spreadsheet udf_toy.xls you can see the signature of the three functions that can be user-defined. The functions will be called each time the spreadsheet is recalculated.

Our implementation is currently limited to three user-defined functions per spreadsheet. If you need more flexibility, you can use the first string argument to request the sub-function, e.g. “find-insert”, “find-replace”, “find-delete”, and have a switch in your code to run the code that handles each sub-function.

Our recommendation is that you define the functions twice, once in Excel for testing, and then in JavaScript for implementation.

You have to manually paste the definitions into the HTML created by SpreadsheetConverter every time you convert the spreadsheet. Please contact our Help Desk if you need help defining user functions.