Forum Discussion
HoneyRoxas
Aug 17, 2023Copper Contributor
Excel Web won't detect cell click when zoom state isn't 100%
I am working on an add-in and i used Excel.WorkSheetSingleClickedEventArgs. This works perfectly on desktop version but not on Excel Web. I tried running a simple gist from the documentation in scriptlab. Still it is not working if the sheet is not in 100% (zoomed in or out). I also can't find any related documents / discussion about this. Any info will be a big help. Thanks!
- NikolinoDEGold Contributor
The behavior you are encountering, where the onSingleClicked event is not firing when the worksheet's zoom state is not 100% in Excel Web, might be related to the way Excel Web handles event coordinates and scaling. While I do not have real-time updates on Microsoft's specific changes to their software, here are a few general considerations and suggestions:
- Zoom State and Coordinates: When the worksheet is zoomed in or out, the coordinate mapping might not match the pixel position of the click event with the actual cell address as expected. This can potentially affect the detection of cell clicks, especially in an add-in where coordinates and scaling need to be accurately interpreted.
- Cross-Browser Compatibility: The behavior of add-ins can sometimes vary between different browsers when using Office.js. Make sure you are testing your add-in in supported browsers, and keep an eye out for browser-specific behavior.
- Community and Forums: Since this seems to be a specific issue with event handling and scaling in Excel Web add-ins, you might want to reach out to the Microsoft Tech Community or the Stack Overflow community for Office.js for more specific insights. Microsoft's developers and support teams often participate in these forums and might provide guidance on potential workarounds or solutions.
- Office Add-ins Documentation: Keep an eye on the official documentation and release notes for any updates related to this issue. Microsoft might address and resolve such issues in future updates to Office.js.
- Test Different Scenarios: Experiment with different scenarios, including various zoom levels and browsers, to identify whether the issue is consistent or if it might be specific to certain conditions.
As software behavior can change with updates and improvements, it is a good practice to keep your add-in updated to the latest version of Office.js and to stay informed about any changes in behavior through official communication channels.
If you need interactive behavior that goes beyond Excel Online's built-in capabilities, you might need to consider using the desktop version of Excel or exploring other platforms that offer more advanced scripting and customization options.
My knowledge of this topic is limited, but since no one has answered it for at least one day or more, I entered your question in various AI. The text and the steps are the result of various AI's put together. Therefore, I have this solution proposal/Suggestions/Steps for you.
My answers are voluntary and without guarantee!
Hope this will help you.
*If you liked my answer, please like this one.
If my answer helped, please mark it as the correct answer.
This will help several users here.