I am building an Excel Addin using Office JS API. I have found a workaround to dynamically generate drop-down lists and now I am wondering whether I can add a Button on excel sheet using Excel JS API
Asked
Active
Viewed 491 times
1
-
Do you mean a custom button on the Office ribbon? That can only be done with the add-in's manifest. There's no way at present to do it programmatically at runtime. – Rick Kirkham Mar 23 '20 at 20:49
-
no, I mean to add a button on a cell or on a range of cells of an Excel Sheet. I know that on the Ribbon, buttons are entered through manifest explicitly. – Konstantinos Cheilakos Mar 23 '20 at 21:31
-
There is no way to add a button to the spreadsheet itself with the Excel JavaScript Library. – Rick Kirkham Mar 23 '20 at 22:19
-
ok, thanks a lot Rick. I had seen this answer in a previous post in 2016, so I just wanted to make sure it is still the same. – Konstantinos Cheilakos Mar 24 '20 at 06:46
2 Answers
1
It seems that currently there is no way to add a button to the spreadsheet itself with the Excel JavaScript Library.

Konstantinos Cheilakos
- 129
- 10
0
While you cannot add a button through the Exel Javascript Library, you can format a cell to look like a button and have it execute your javascript code when clicked. See a post I wrote on this: Excel Office.js -add button on Workbook_Open() envent

Gove
- 1,745
- 10
- 11