Add a Macro Button to a Worksheet Using the Aspose.Cells API

671 views Asked by At

How do I enable calling a macro on a button click via the Aspose.Cells API? I couldn't find any documentation on it. "Guessing" approach didn't yield any result either.

1

There are 1 answers

0
mcalmeida On

Newer version support that:

http://www.aspose.com/docs/display/cellsnet/Assign+Macro+to+Form+Control

Basically, you set the "MacroName" property, like so:

button.MacroName = sheet.Name + ".HelloWorld";