I'd like to know how to create a standard "Microsoft Excel" button by code; the button I'm referring to is created as follows:
Right-click on the Ribbon, Customize Ribbon, Microsoft Dynamics 365 Business Central, and then click OK. Print, Send, and "Add" "Microsoft Excel" to perform the desired action on the ribbon page.
I know I can use an excel buffer or a code unit, but I want the functionality that "Microsoft Excel" uses to create a button by code, specifically:
"Excel CU 365."createExcelByTable(18).
Here's a link that may help you.
3 Easy Methods to Create Button in Excel for Macros | MyExcelOnline