We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

New Workbook Event Handler

Hi there!

is there any way to fire a callback when creating a new workbook, e.g. when we click on the `New` button from top left menu


Thank you in advance
Best


4 Replies

SP Sangeetha Priya Murugan Syncfusion Team October 7, 2022 05:19 AM

Hi Reda,


Your requirement can be achievable by using the fileMenuItemSelect event as like as below.


CODE BLOCK:


 

 

 function fileMenuItemSelect(args) {

    console.log(args.item.text); // returns the selected item text

  }


Sample Link: https://stackblitz.com/edit/react-xg7zxr?file=index.js


API Link: https://ej2.syncfusion.com/react/documentation/api/spreadsheet/#filemenuitemselect


Kindly get back to us if you need further assistance regarding.


Regards,

Sangeetha M                   



RE Reda El Khayat October 7, 2022 05:24 AM

Thank you Sangeetha for the reply
I'm not sure this will work as the new worksheet needs a confirmation (basically, when we click on "New" it opens a modal to confirm new workbook creation) - what I need to do is to know if user choose to proceed to not 


Best



SP Sangeetha Priya Murugan Syncfusion Team October 10, 2022 07:48 AM

Hi Reda,


Currently, we don’t have any event for creating the new workbook in spreadsheet. And we need to check the feasibility of this requirement. So, we will update you the further details on October 12th, 2022. We appreciate your patience until then.


Regards,

Sangeetha M



SP Sangeetha Priya Murugan Syncfusion Team October 11, 2022 09:23 AM

Hi Reda,


Before we proceed further, please share your requirement for call back event while creating new workbook. Is there any customization need to be done in your side? If yes, please share the detailed description of your requirement based on that we will check and provide you a better solution quickly.


Regards.

Sangeetha M


Loader.
Live Chat Icon For mobile
Up arrow icon