08-06-2021 08:59 AM - edited 08-06-2021 09:54 AM
All,
I have an program that sends keystrokes to any open application using the .NET System.Windows.Forms.SendKeys.SendWait method which works great and I haven't had any issues until users wanted to use this functionality within an Excel Workbook that has been placed on SharePoint.
Anyone who has used SharePoint and Excel knows that SharePoint lets you open the workbook within the web browser (I use Edge) and you can interact with cells, add data, etc. I had assumed that using this method would work just like it did before within any workbook using the Excel app but it seems that it doesn't. It acts like the data never gets sent or SharePoint is blocking it somehow.
Has anyone else ever ran into this before? I haven't tried any other browser. The workaround is to open the workbook using Excel. I wondered what others users have experienced, if any. I've attached a sample program to try out.
Eric
08-06-2021 12:02 PM - edited 08-06-2021 12:03 PM
Aye. Long day, fellas.
I didn't realize that there was a viewing tab within SharePoint. SharePoint (I think) has an extension called Excel Web Access Part and it let's you view/edit workbooks within SharePoint. It defaults to View access...at least mine does.
Low and behold, I can't edit it. Because...it's in VIEW MODE! But that doesn't mean other's cant. I am going to investigate this further but I think I found the root cause.
09-06-2023 01:55 AM
Hi Eric.
Good to see You solved Your problem.
I'd like to see Your Application as I might be able to use for my own project.
Unfortunately I'm stuck with LV19.
Could You post a Version saved in LV19.
Thanks in advance.
Best Regards
Bjarne
09-06-2023 10:06 AM
Bjarne ,
While I can't send the final code (its proprietary), I can share my solution.
Since I made this post, updates to Teams/Sharepoint now lets you open files using the desktop app - at least Office 365 does. I haven't tried non-Office apps like Notepad. The solution works but I've had some users state that sometimes, when inserting double-precision data, the first digit won't come over when using the Edit in Teams selection.
So, I've directed users to open the workbook (we primarily use Excel) in Open in app selection. That is the direction I point my end users towards so that the SendWait works properly.
As requested, here is the SendWait in v19.
09-07-2023 04:14 AM
Hi Eric.
That was exactly what i needed.
Nifty little application.
Thanks for sharing.
Best Regards
Bjarne
09-07-2023 07:10 AM
Here is the MS Documentation if you need it.