OfficeDev / office-js-docs

[ARCHIVED] Microsoft Office Add-ins API Reference Documentation
https://docs.microsoft.com/javascript/api/overview/office
398 stars 247 forks source link

Event Listener for when conditional formatting changes [Excel] [Feature Request] #1503

Closed achang0406 closed 5 years ago

achang0406 commented 5 years ago

There are currently event listeners for worksheet.onChanged, worksheet.onSelectionChanged, worksheet.bindings.onDataChanged, etc...

We fail to find a listener to detect when conditional formatting changes.

Our current workaround is to compare the conditional formatting tree at every 5 second interval to identify whether conditional formatting has changed. This is expensive and performs poorly.

Is there a better way to detect whether conditional formatting has changed?

Not sure if a similar feature is already in the development but can this feature be requested?

weshi commented 5 years ago

Would you please provide more detail on the requirements and scenarios for this conditional format change event? What information do you need to be included in the event arguments when this event is fired?

achang0406 commented 5 years ago

Sure thing.

Essentially we will need a a listener to be triggered anytime a conditional formatting gets added, deleted or modified. The event arguments should return…

  1. list of conditional formatting thats are changed

    • how they are being changed (added, deleted, modified)

    • Worksheet and range of cells affected

    • the updated conditional formatting rule

    • Formatting style (font color, cell color, font style, etc)

    • timestamp (not necessary but could be helpful)

    • Previous conditional formatting rule (not necessary but could be helpful)

    • previous formatting style (not necessary but could be helpful)

At a minimum, we will just need to know anytime a conditional formatting changes (added, deleted or modified) so we don't have to check every 5 seconds to compare the conditional formatting tree

weshi commented 5 years ago

Thank you @achang0406 for the information. Sorry for replying late. I am at the Ignite 2018 conference this week. We will include this requirement in our planning and get back where there is update. Thank you very much!

achang0406 commented 5 years ago

Any chance you can also take a look at these two other issues? These are somewhat related. https://github.com/OfficeDev/office-js-docs/issues/1507 https://github.com/OfficeDev/office-js-docs/issues/1508

These are all critical to our development cycle and future planning. I really appreciate you for being responsive thus far. I am looking forward to your updates. Please let me know if I can help clarify anything. Thank you!

weshi commented 5 years ago

@achang0406 Thank you very much for these good feedback. We are tracking these requests in our internal planning. Once there is more update, will replay back. Thanks for your patience.

weshi commented 5 years ago

Tracked internally via Product Backlog Item 2626622: [Customer Ask] Event Listener for when conditional formatting changes

kbrandl commented 5 years ago

@achang0406 if you haven't already done so, can you please log this as a feature request in UserVoice? We'll be archiving this repository (OfficeDev/office-js-docs) soon.