From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sending keystrokes to a Excel Workbook via SharePoint

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

0 Kudos
Message 1 of 6
(983 Views)

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.

 

Eric1977_0-1628269087707.png

 

0 Kudos
Message 2 of 6
(954 Views)

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

Don't forget to rate a good Answer....
---------------------------------------------------------
Here should be some cool signature

But there's NOT

LabVIEW 2012-2017
---------------------------------------------------------
0 Kudos
Message 3 of 6
(516 Views)

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.

Message 4 of 6
(487 Views)

Hi Eric.

 

That was exactly what i needed.

Nifty little application. 

Thanks for sharing.

 

Best Regards 

Bjarne

Don't forget to rate a good Answer....
---------------------------------------------------------
Here should be some cool signature

But there's NOT

LabVIEW 2012-2017
---------------------------------------------------------
0 Kudos
Message 5 of 6
(463 Views)

Here is the MS Documentation if you need it.

0 Kudos
Message 6 of 6
(451 Views)