LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

OT Using Excel at the same time as using ActiveX interface to same?

Solved!
Go to solution
Could you use the excel viewer or office web components instead of having excel installed on the machine?? Is there a way to restrict the office installation to only allow certain users to see it??
0 Kudos
Message 11 of 20
(2,229 Views)
" ... instead of having excel installed on the machine?? "
 
How would I update the sheets without Excel on my machine?
 
Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 12 of 20
(2,226 Views)
Is there any change in behavior if you set Open New Instance to true? I'm also a little confused that the user is somehow managing to open your instance of Excel. I would have thought they'd open their own instance by default.

Other than that I can only recommend modifying your AE to have a case (Is Excel Open) it always executes before moving on to the desired case. If that case is false, it could close references, divert briefly to Init, and then go to the desired case. So your AE would basically become a small state machine that hopefully only executes one case most of the time.

One more option: Don't continuously dump your data into Excel. Use a temporary file format for the data, like CSV. Then build your clients a quick app that converts this temp file into their fancy Excel spreadsheet whenever they want to view the current data.
Jarrod S.
National Instruments
0 Kudos
Message 13 of 20
(2,220 Views)

Ben,

Have you tried a cut down version that only opens 1 workbook with 1 worksheet?  Starting to wonder if your problem is related to the # of workbooks/worksheets?

0 Kudos
Message 14 of 20
(2,211 Views)

The user is just opening Excel!

Regarding turning my Action Engine into a state machine.

I would probably implement a sub-VI rather than twist the action engine back on itself because a constant wired to the condition terminal is a specail case that LV understands. Smiley Wink

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 15 of 20
(2,210 Views)

Ben,

I have been able to recreate this using the Write Table to XL example on LV8.2.  Modify the block diagram so that Excel does not come up visible, and then run the VI with the completion task set to Leave Excel Open.  You now have an open invisible Excel workbook.  Change the block diagram so that Excel comes up visable and run again.  It opens the invisible workbook and the new workbook under the same instance of Excel.  Best of all, it was all accomplished using NI supplied code.Smiley Very Happy

If you made your instance of Excel visible, could you then set some parameters for that particular instance to keep the operators from closing/modifying your data?

0 Kudos
Message 16 of 20
(2,202 Views)


@centerbolt wrote:

If you made your instance of Excel visible, could you then set some parameters for that particular instance to keep the operators from closing/modifying your data?


I'm guessing the Readonly property I mentioned earlier, but I can't check.

___________________
Try to take over the world!
0 Kudos
Message 17 of 20
(2,175 Views)

Thanks to all who have offered ideas.

Shane and centerbolts ideas appear worth testing.

I'll try to talk to the custemer today (maybe).

Thanks!

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 18 of 20
(2,116 Views)
Solution
Accepted by Ben
"Their and Back Again" (Jules Verne (sp?)
 
I set "interactive = F" when I opened Excel and this stoped the operators from breaking my application.
 
 
They can still open and do a "Save As..." but my stuff is surviving.
 
Thanks for the ideas!
 
Ben

Message Edited by Ben on 06-26-2007 11:25 AM

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 19 of 20
(2,093 Views)
Had same problems. The user must be able to view the excel-file, but not modify or screw anything up. Interactive=False doesn't work either. The user can open another file and close Excel and screw things up. What I did which solved everything was that I open a second reference to Excel directly after I open "my" Excel reference (open new instance=true for both). This will make "my" reference exclusive to me and when the user opens the excel-file it will be opened in the second instance and be read-only for the user.
Certified LabVIEW Architect
Message 20 of 20
(1,974 Views)