LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

vi runs fine but executable does not (involving ActiveX, problem with sheets invoke node)

Hello, I'm quite new to LabVIEW and I've encountered a problem with ActiveX. I need to display the excel sheet as a picture and my vi runs exactly as expected. But when i build into the exe, the picture wouldn't display out. I've made sure the path is correct and there is no error shown for the exe. I also tried to debug and i found out that the sheets invoke node have some problem. The value that came out from item is 0 in exe while in vi, there's a certain value that came out. I do not know why is this happening. I've read other forums and tried to do what they had said, I tried to rebuild my block diagram and i changed the object library to Microsoft Excel 15.0 Object Library Version 1.8 but i still cannot solve the problem. Is there anyone who can tell me the solution? FYI, I'm using LabVIEW 2015 SP1 and our company just upgraded Microsoft Excel from 2010 to 2013. Does the version of excel matters? I've attached an image of my vi below. Thank you very much.

0 Kudos
Message 1 of 5
(3,259 Views)

@Yean95 wrote:

Hello, I'm quite new to LabVIEW and I've encountered a problem with ActiveX. I need to display the excel sheet as a picture and my vi runs exactly as expected. But when i build into the exe, the picture wouldn't display out. 


Is this on the same PC or a different one? This can make a huge difference. On the same PC, all the (early binded) AX objects should be there. On a different PC, the versions might be different and cause problems.

 


@Yean95 wrote:

I've made sure the path is correct and there is no error shown for the exe. I also tried to debug and i found out that the sheets invoke node have some problem. The value that came out from item is 0 in exe while in vi, there's a certain value that came out. I do not know why is this happening. 


Is there an error? That would be useful information.

 


@Yean95 wrote:

I've read other forums and tried to do what they had said, I tried to rebuild my block diagram and i changed the object library to Microsoft Excel 15.0 Object Library Version 1.8 but i still cannot solve the problem. 


Please share those links, if you still have them. Typically, without an error it can be hard to find a solution.

 


@Yean95 wrote:

Is there anyone who can tell me the solution? FYI, I'm using LabVIEW 2015 SP1 and our company just upgraded Microsoft Excel from 2010 to 2013. Does the version of excel matters?


The version can matter, especially when running on different system(s).

 


@Yean95 wrote:

 I've attached an image of my vi below. Thank you very much.


Images are not that useful... We can't run an image, not change it and send it back.

 

Insert images (don't attach, save us a download) and\or attach VIs when possible.

0 Kudos
Message 2 of 5
(3,134 Views)

It's on different PC. The original version was done by my senior and at that time, the excel version was 2010. Then when i started to do this project, the excel already upgraded to version 2013. But our labview version are the same. There's no error at all but the picture just won't display out. I've attached a screenshot of the probe watch window for both vi and exe. I don't have all of the links but i'll post some that I still have it. And those links that i found, their problems are not exactly like mine, but i just try it out their solutions and none of them work. 

 

https://forums.ni.com/t5/LabVIEW/Error-in-microsoft-workbook-invoke-node/td-p/3361661/page/2?profile...

*I changed the excel format from xlsx to xls.

 

https://forums.ni.com/t5/LabVIEW/Application-Build-Failure-on-Excel-Print-Report-call/td-p/1081380?p...

* I changed the invoke node method and changed it back again. And i even rebuild the whole block diagram too.

 

https://forums.ni.com/t5/LabVIEW/Excel-2013-ActiveX-object-unavailable/td-p/2773368/page/2?profile.l...

* I changed the object library to Microsoft Excel 15.0 Object Library Version 1.8 

 

https://lavag.org/topic/19921-activex-to-automate-excel-buganomoly-report/

* Someone mentioned crash is exhibited in LabVIEW 2016 with Office 2016 and LabVIEW 2015SP1 with Office 2013, but i'm not sure if it's true or not.

 

The vi have a certain value but the exe output is 0.The vi have a certain value but the exe output is 0.

This is the sheets invoke node item output. The vi have a certain value while the exe output is 0.

 

The part where there's difference between vi and exe.The part where there's difference between vi and exe.

The part where there's a difference between vi and exe.

 

The exe shows no error at all but the picture just won't display.The exe shows no error at all but the picture just won't display.

The exe shows no error at all but the picture just won't display.

 

I also attached my VI, SubVI and excel file here. Please have a look. Thank you very much.

 

0 Kudos
Message 3 of 5
(3,011 Views)

On different PCs you can run into all sorts of trouble.

 

The executable binds to the exact Excel (some for Word btw) version. I even had executables fail because the Dutch Excel version was installed, in stead of the English version...

 

AFAIK, You (still) get the exact same problem when using the report generation toolkit.

 

Also, AFAIK, there's not really a solution. Compiling an executable for each flavor of Excel seems to be the only way. Of course you can build a dll or pll for each flavor, but the compilation on each system is required.

 

I hope someone will prove me wrong, and provide a solution. It's been a few years since my last tried...

 

We got some results by using MS's (IIRC) .NET wrapper around the AX functions. This still has the same problem, but (IIRC) they provide two libraries. One for earlier Office versions, one for later versions.

 

At some point, someone will have to make a xlsx\docx library for LV. These xlsx\docx files are 'just' zipped xml files, and the specs are open. It won't be easy to make a feature complete library, but getting simple things done seems doable. And this will only need build in functionality, so it will also work on Linux, MacOS and RT.

0 Kudos
Message 4 of 5
(2,948 Views)

I am also seeing this problem with LabVIEW not seeing my work's install of Office 365 that has just been updated. Error -41106.

 

Driving me insane trying to sort out how to fix this. All my compiled LabVIEW apps I have written using the Office add-ins are now broken and my staff are screaming for help.

 

The best I have found is this article but it doesn't fix it for me. https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019KZNSA2&l=en-AU.

 

Now looking a way to be able to dump a text file to a Windows 10 printer without using Office. Help!!!!!

0 Kudos
Message 5 of 5
(1,963 Views)