03-13-2015 12:03 AM
hai NI,
I am doing project in calibration and verification of analog io cards using LABVIEW.For report generating in excel i want to display pass or fail cells in green and red color.so how to give that condition for formating the cells using report generation tool kit.Pls reply soon....
03-13-2015 12:26 AM
Did you try to use the "Excel Set Cell Color and Border.vi" from the Report Generation toolkit. I am sure this does what you expect.
03-13-2015 08:41 AM
03-13-2015 11:27 AM
So you know how to do it but stuck how to implement. How are you deciding the Pass/Fail conditions and how are you passing it to the Excel report? The logic is very simple, when you write Pass set the color as Green and if it is fail set the color to Red. Please attach the code you developed so that we can give you a more appropriate solution.
03-13-2015 02:29 PM
We have no Idea what you are comparing, but I wrote a quick diagram using The report tool to show you how it could be done. Like the above poster mentioned you really need to give more information for some ideas on a solution.
I wrote this to put the numbers in the array to red or green in Excel based on whether they are greater or less than zero.
03-14-2015 11:18 AM
I have attached my report generation tool in labview.In that output data is in string.It create the excel document with RESULT column as pass or fail.in your attached picture numeric string is compared and gives true or false to the case structure.But i want compare the pass or fail in result column in excel.That case structure is implemted correctly using excel color and border tool but for selector in case loop should compare pass or fail string.
please give some solution as soon as possible.
03-14-2015 11:51 AM
I don't understand. The code you present shows that it wasn't written by a beginner, but by someone (you, perhaps?) with some knowledge and familiarity with the Report Generation Toolkit. In addition, you seem to understand the previous "solution" to your question about how to color individual cells Red or Green based on some condition. Now you wnat someone to "finish your project" for you by doing the one part of this project with which you are the most familiar, namely deciding which is the specific criterion for coloring the cells? Will you be willing to tell your manager that the solution was completely provided by the NI Forums, and give whoever posts the solution full credit to your superiors?
03-16-2015 08:42 AM
Your output data in your VI is a numeric, and then converted to a string before writing to excel. I am not seeing the results column.
I think you may be trying to bite off too big of a chunk. Look at the example I gave you. Instead of trying to compare the whole table of data at once, the example I gave you does each individual piece of data in the array and then writes that data, and then formats the cell. You have a 2D array of data, that can be compared and then written as a string in the same fashion.
03-16-2015 11:56 PM
I make some changes in report generation tool.In that result coloumn is inserted and analog op% error coloumn produces automatic value in output data.It should be lessthan plus or minus 1%.This condition is checked and the result colomn is display pass or fail.That depending on pass or fail shoud bo color on green and red.
03-17-2015 06:59 AM
Okay, This is what I am understanding. You have a 2D string array being written to an Excel file, where column 8 is the "Pass/Fail" column. I have modified the program I wrote above to reflect what I think you are trying to do. You should easily be able to modify it and use it in your program.