0

I am working on a Office 365 Excel Add-ins and have the basic setup with the manifest. I want to be able to create a new worksheet and have a different state of the same taskpane.

So for example, let say in Sheet1 i am doing some validation on the data, and it give me back some error message on the taskpane. I want to be able to create a new sheet called Sheet2 and have a new taaskpane (the original state of the taskpane when i first launch it).

Is it possible?

I was thinking different taskpane have different ID and when you create a new sheet it generate a new id for that taskpane, but can you dynamically set the new ID to the manifest file? i dont think there's a way

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
phu
  • 1

1 Answers1

0

You can specify URL parameters to your task pane from the manifest file.

But a better way is to handle Excel events and update the task pane content accordingly. See Work with Events using the Excel JavaScript API for more information about the event available.

Each time certain types of changes occur in an Excel workbook, an event notification fires. By using the Excel JavaScript API, you can register event handlers that allow your add-in to automatically run a designated function when a specific event occurs.

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
  • Hey! thanks for the suggestion, but how would you track the active worksheet every time im switching the sheet? also I want to keep the state of the taskpane for each sheet as well. – phu Mar 23 '23 at 16:47