Jump to content
Yean95

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

Recommended Posts

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.

excelreadpic.JPG

Share this post


Link to post
Share on other sites

Just a quick idea, I didn't try to run your code.  But I doubt that Excel tolerates an index less than 1.  Is it possible that the count of "Shapes" is 0?  Is it possible that the Sheet Index was 0, which in turn causes the count of Shapes to be 0?

Share this post


Link to post
Share on other sites

The Excel .NET API behaves better with LabVIEW than the ActiveX one. From your point of view, they are the same, so why not use .NET?

Share this post


Link to post
Share on other sites
10 hours ago, torekp said:

Just a quick idea, I didn't try to run your code.  But I doubt that Excel tolerates an index less than 1.  Is it possible that the count of "Shapes" is 0?  Is it possible that the Sheet Index was 0, which in turn causes the count of Shapes to be 0?

Nope, the sheet index i already set to 1 as default and the count of shapes is 1 as well. I actually debugged the exe, and the problem that i found is at the sheets invoke node. The output of item is 0 in exe while in vi, the output has a certain value. But i just don't know why is this happening. 

Share this post


Link to post
Share on other sites
1 hour ago, Gribo said:

The Excel .NET API behaves better with LabVIEW than the ActiveX one. From your point of view, they are the same, so why not use .NET?

I've never use .NET and this was originally done by my senior. I will try to use .NET now. Thank you !

Share this post


Link to post
Share on other sites
1 hour ago, smithd said:

If you don't need to use labview, I recently used this tool:

https://github.com/glexey/excel2img

You can run direct from the command line or build it into an exe using pyinstaller.

Sadly I must use labview. There's other program that needs to be combine together with this.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.