We are running a stored proces, which is triggered from Excel (a VBA button calling the STP). This STP creates a SAS file, which is then opened in the SAS Excel add-in , to be edited by the Excel user. The user now has to manually click the "Begin Edit" button in the SAS add-in menu bar to be able to edit the data set. This works fine and is not a real problem of course, but we thought it would be nicer to open the edit mode automatically from VBA without necessary user interaction in Excel.We have been looking to find if this is possible, but have not been able to find the option to do this.
As said, no real issue but any ideas or pointers are welcome.
That is not recommended in any way, the reason is there might be lock issue encountered in the dataset. Edit option will lock the dataset by the user for editing and no other person can edit meanwhile. Automatically locking it (Edit option) is not required if the use doesn't wish to edit all the time he open's the sheet. Some users might leave the sheet opened which might lock the dataset for longer time and cause issues down the stream.
I recommend let the user choose to lock it (Edit mode) and when he is done unlock it (End Edit mode) , which is smart way.
Hope this makes sense.
That is not recommended in any way, the reason is there might be lock issue encountered in the dataset. Edit option will lock the dataset by the user for editing and no other person can edit meanwhile. Automatically locking it (Edit option) is not required if the use doesn't wish to edit all the time he open's the sheet. Some users might leave the sheet opened which might lock the dataset for longer time and cause issues down the stream.
I recommend let the user choose to lock it (Edit mode) and when he is done unlock it (End Edit mode) , which is smart way.
Hope this makes sense.
Thanks for the responses. In our specific case we wouldn't be worried about file locking etc. because we are actually working on a temporary file, specific for a user and a specific selection of data, which is then later incorporated in an overall file.
But as said it is no problem to have the user press the edit button, it is just good to know that we don't have to look for the option as it is not available. There are so many possibilities to interact with the add-in that you can easily miss a possibility when looking for it.
Thanks
The locking side-effect that Suryakiran mentioned is a very good point, and the main reason you wouldn't want to automatically always go straight into edit mode. Another is that the SAS Add-in for Microsoft Office doesn't otherwise know whether the user is intending to simply edit the values in the local spreadsheet, or whether they wish to edit the physical underlying table (on the server). The Begin Edit button makes it explicit that you are editing the underlying table and not just the cells in the spreadsheet, retrieves the latest values from the source, and acquires the lock (so the data can't change out from under you by another person or process while you are editing).
Casey
Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF
View now: on-demand content for SAS users
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!