06-09-2011 08:04 AM
All,
As always, thanks for the help you have given me in the past....especially the Vets. I have tried to figure out a solution to my issue from the message board, but no solution seems to fit what I am doing.
Here is my situation...... I am using Labview to test my product one unit at a time. I have always used Teststand and report generation from there, but this time it is strictly Labview. This is my first attempt to create a logfile with Excel that appends one xls file everytime one unit is tested.
The way my test is set up now, I test and collect the data in an array for when I created the logfile generation VI. I took several stabs at it, looked at examples, but cant figure out the direction I need to go to create this. Here is the parameteres necessary for the logfile (spreadsheet).
-All UUT's will go into one spreadsheet and the spreadsheet will be appended by adding new data in next available row.
-Data is imported to spreadsheet in array format.
-Test data that passes will be green, test data that fails will be red (I can figure this out, but this is why I need to use Excel)
-I want to use Excel so I have more flexibility for graphs and things of that nature in the future.
It seems rather simple, but not for me.....lol. If I go to the Report Generation Toolkit, i see "Create Report" and "Append Report"....but Append Report still wants the "report input" node wired. What do I wire that to? For example, if I have an excel spreadsheet called hangover.xls, do I somehow wire hangover.xls to the input? I am having trouble finding answers. I would really appreciate a simple JPG or VI so I can understand the setup for what I want to do.
Comments and links to threads/help appreciated!
Ryan
06-09-2011 08:10 AM
06-09-2011 08:17 AM - edited 06-09-2011 08:17 AM
Thanks Evan,
However, I forgot to state that I have Labivew 2009 SP1. Would you mind saving it in an older version so I can open it? (Excel Report Creator)
Ryan
06-10-2011 12:28 AM
Hi again!
I would love to save it back, but I don't have 2009 installed and if the VI's are created with LV2010 I can not save it back, because the Free Excel Toolkits won't let me
However, there is an example here, created in LV2009.
06-11-2011 12:39 PM
Hi Evan,
Thanks for the other examples....I thought I was going to be able to manipulate them into what I want, but ended up spending about 6 hours playing with it and up to 2am. I am getting so frustrated with this. This is new ground for me, I never have experimented with logfile creation. I am sorry to keep bothering you with this but I am ready to pull my hair out. I attached a couple Vi's....Spreadsheet import is the main VI and report.vi is the sub.....i need to rename them better but haven't got there.
First off, that VI you posted that I couldn't open, could you just take a JPG of the block diagram? That would really help.
I need to create a spreadsheet with logfile data in rows. The spreadsheet is to be appended for each unit under test. Each unit under test gets one row and all data is written at the end of the test. If you look at the spreadsheet_import.vi, I am basically taking a bunch of 1D arrays of data to create one long 1D array for one row.
Every month a new spreadsheet is created (so log file data is divided into months) , and that is what the report.vi does....it looks to see if the filename is already created and if not, sends a boolean to the write to spreadsheet file to append. I reverted to "write to spreadsheet" because for the life of me, I cannot figure out how to use the worksheet portion to do this. I would think this should be pretty simple, but I cannot figure out and its not for lack of trying.
If I use "write to spreadsheet", I am going to run into problems because I ultimately want to use a excel template with formulas but if I can figure it out, this will have to do.
All I really want to do is to create a spreadsheet if one doesnt exist or append if it does, combine all my 1d array data, and create one row with this data. The other issue I ran into before is I cant figure out how to tell Excel where the next row is.......UUGHHHH! This is definitely stressing me out as I have a deadline and I will gladly sent a case of beer to Norway for the help received.
Dying Here,
Ryan
06-13-2011 01:14 PM
Hi SimpleJack,
This seems a little overcomplicated for what you are trying to do. Check out the block diagram below:
This VI will append new data (array of strings) to the next available row in the spreadsheet referenced, or create a new spreadsheet if it does not exist when the Write button is pressed. Is this not what you are looking for?
Have a great day,
Chris V
06-13-2011 08:46 PM
Thanks
Chris,
That does look a little more simple than what I was doing....I may modify...thanks. However, correct me if I am wrong, but I dont get the Excel features from using the "write to spreadsheet" function.
06-13-2011 09:00 PM
06-14-2011 05:18 PM
Hi SimpleJack,
Sorry, I overlooked the part where you originally were trying to change the color of the text. Is that the only thing you're talking about in terms of Excel functions?
This can be done through ActiveX, but it's going to be a little complicated. This example demonstrates some of that functionality. You could also then use ActiveX to set the value of the cell using an Invoke Node, but I think it's starting to get a little more complicated than you want at that point.
Have a great day,
Chris V
06-14-2011 09:52 PM
Chris,
Thanks for the link...I will bookmark that for the future. I think I am going to use .csv file extensions for now, and when I have more time, research and practice how to affectively use Labview for Excel creation.
It is just so easy to do in Perl, but I think once I learn how to do it in Labview, i wont have to mush codes together.
Ryan