Yean95 Posted January 2, 2020 Report Share Posted January 2, 2020 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. Quote Link to comment
torekp Posted January 2, 2020 Report Share Posted January 2, 2020 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? Quote Link to comment
Gribo Posted January 3, 2020 Report Share Posted January 3, 2020 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? Quote Link to comment
Yean95 Posted January 3, 2020 Author Report Share Posted January 3, 2020 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. Quote Link to comment
Yean95 Posted January 3, 2020 Author Report Share Posted January 3, 2020 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 ! Quote Link to comment
smithd Posted January 3, 2020 Report Share Posted January 3, 2020 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. Quote Link to comment
Yean95 Posted January 3, 2020 Author Report Share Posted January 3, 2020 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. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.