BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
JanHettema
Fluorite | Level 6

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.

 

1 ACCEPTED SOLUTION

Accepted Solutions
SuryaKiran
Meteorite | Level 14

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,
Suryakiran

View solution in original post

3 REPLIES 3
SuryaKiran
Meteorite | Level 14

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,
Suryakiran
JanHettema
Fluorite | Level 6

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

CaseySmith
SAS Employee

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

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
Discussion stats
  • 3 replies
  • 1436 views
  • 3 likes
  • 3 in conversation