12-22-2017 04:48 PM
Hi,
I've got a LabView 2015 program running in Windows 7 that:
Recently I added a feature to Step 2 to write some of the user input back into a particular column in a particular worksheet of "test bench master.xls" using the "Excel Easy Table" vi. It does accomplish this task correctly without warning on my laptop where I have LabVIEW installed and Excel 2010. It does the same when I build the application and run it on the customer's computer with Excel 2007, but it generates an error (named in the title of this message) an error window. The user must press okay in the error window, and then the data writes.
I get the same results with the sub vi that accesses Excel separate from my program, so I've just attached the sub vi here. I'll also include some screen captures about the two PC environments and the "test bench master.xls" spreadsheet with proprietary stuff removed.
The sub vi basically reads the column of data, pads the new data with blank lines if it is smaller in size then the original data, and then writes the new data back to the spreadsheet overwriting the existing data.
How do I make the error go away?
12-27-2017 04:47 PM
If I understand correctly, there isn't a problem with the way your program is running. It's just throwing an unnecessary error that is annoying to click past?
You can ignore this specific error in LabVIEW programmatically, which will stop that dialog from popping up. Here's a link to a document with instructions and code snippets that you can drag and drop into your code:
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P85KSAS
Hope this is helpful!
01-02-2018 12:24 PM - edited 01-02-2018 12:25 PM
Hi francine.p. Thanks for the reply. Yes, you are understanding me correctly. I hadn't thought of ignoring the error. I'm wondering whether we should find the source of the error? Could it be warning me of some significant problem in my VI?
01-03-2018 10:58 AM
If you're trying to find where the error occurs, you can wire separate instances of the Simple Error Handler VI throughout your code, and track execution to see where the error occurs. You can also disable parts of your code to see if this stops the error from occurring using the Diagram Disable structure.
01-04-2018 10:08 AM - edited 01-04-2018 10:10 AM
Hi Francine - Yes, I've done this. It definitely occurs at when I call the NI VI "Excel Easy Table". See attachment to first posting. Ignoring an error that is not applicable could be a perfectly good solution, just want to make sure nothing is wrong first. Thanks! Andy
01-04-2018 12:11 PM
This seems to be a relatively frequent error when you use different versions of Excel. A possible fix I've seen is to clear the formatting before writing back the data. Translated into LabVIEW that would mean in this case using the Excel Set Cell Color and Border.vi (with a transparent background color).
01-09-2018 11:50 AM - edited 01-09-2018 11:51 AM
Got it. Thank you. This looks like a decent solution. Not super intuitive, but maybe a little better than ignoring the error, and likely better then digging into the nitty-gritty of NI/Windows interface. It may be a while before I'm back at the customer site, but I'll be sure to mark as solution if it works. If it doesn't, guess I'll have more questions. Anything you suggest checking when I'm there that might help if this doesn't work? Thanks again!