Run Custom Scripts¶
With Office.js add-ins, you can bind a custom script to buttons in various places:
Config¶
Here are the settings that you can provide in the config dictionary:
exclude
(optional): By default, xlwings sends over the complete content of the whole workbook to the server. If you have sheets with big amounts of data, this can make the calls slow or timeout. If your backend doesn’t need the content of certain sheets, the exclude option will block the sheet’s content (e.g., values, pictures, etc.) from being sent to the backend. Currently, you can only exclude entire sheets as comma-delimited string like so:"Sheet1, Sheet2"
.include
(optional): It’s the counterpart to exclude and allows you to submit the names of the sheets whose content (e.g., values, pictures, etc.) you want to send to the server. Like exclude, include accepts a comma-delimited string, e.g.,"Sheet1, Sheet2"
.headers
(optional): A dictionary with name/value pairs that will be provided as HTTP request headers. For example:{"headers": {"key1": "value1", "key2": "value2"}}