11-05-2010 02:49 PM
I have this problem.......... LOL
Here's the scenario. I am haveing to read approximately 500 - 600 inputs (all t type tc's) and I need to export them into an excel sheet and into specific cells. I know I could use the "set cell value.vi" but that seems a bit clunky. Is there any way to maybe steamline it? Like maybe drop some code so that the data points are input through a range (c5 - c20) or something like that? I am attaching a vi that i built not too long ago that uses the set cell, but I am unclear as how to do some of the invoke nodes and or active x stuff. Also, just for illustration purposes, I am going to attach the actual sheet that I will be using. I work for a water heater mfg facility and we do a test called " walls floors and ceilings" where we run the unit for a set amount of time and then record all the thermocouples. right now we are doing this manually and If i can import from a common csv or excel sheet and do it faster, that would be great. The equipment that I will be using is a datataker 85 with a capability of recording 640 temps. all the temps need to be input into each individual cells for the floor, each wall, and the ceiling
thanks in advance for any help and if you need more clarification let me know.
11-05-2010 03:39 PM
It's hard to see what you are doing when you password protect your VI.
You could set up an array of rows, array of columns, array of spreadsheets, and an array of values you want to save. Feed those arrays into a For Loop with Autoindexing turned on that wraps the Set Cell Value VI. Now the Loop will step through all of your arrays 1 element at a time feeding the appropriate value into the appropriate cells.
11-05-2010 04:09 PM
Trying to write out the values cell by cell for that many values will be extremely slow since each ActiveX calls has an overhead. What you can do, instead, is to write out the table all at once to a specified range, as shown in the attached example. Note that in your spreadhseet you have hidden columns, so you will need to create the table in LabVIEW to account for this. I also noticed that on the first sheet a few of the cells appeared to be merged. You will probably need to "massage" the spreadsheet to make the writing easier.
11-05-2010 06:26 PM
ravens fan;
Im sorry. Some of the folks that I work with are "less than reputable" lets say, so I have to protect everything I do cuz the "backbiters" are loose these days.
I am re-uping the vi for you to look at. Perhaps this might make a little more sense to you. if it would help, id also like to upload a "capacity" sheet so you can see what i'm trying to do as well and you guys will have a base to work from as far as the the capacity.vi is concerned.
Sorry again.
Myke
11-05-2010 06:33 PM
OK smercurio_fc
makes sense, but I did find that in the set cell.vi merged cells aren't a problem. Since the cell starts at b2 for instance, I can specify b2 (row 2, col 2) and it writes it beautifully. I'd like to try this and also what ravens fan has written and also get some additional input in the future in the event that I don't fully understand what you're saying. You guys make it sound so simple and it probably is, I'm just making it hard in my head.
Thanks and I hope to talk with you again soon.
Myke