03-02-2009 09:50 AM
Hi all! Just had the most wonderful expience getting my data to save with a spreadsheet. Now, for a more challenging task.
Here's what I have right now:
- One Vi will write my data to the following sheet:
-Another writes to the following sheet:
My question is how to tell LV to write to the same sheet, but each test on sperate tabs?
Let me know what info I need to supplier. I know this can be done.
03-02-2009 09:53 AM
how do you write your data now? You have to use ActiveX to write your data to one file into different sheets.
03-02-2009 09:55 AM
03-02-2009 10:13 AM
The write to spreadsheet VIs write an ASCII file that is considered standard for spreadsheet programs, only data, no calculations or multiple sheets.
If you want to write to multiple sheets you should use ActiveX, the NI toolkit for MS Office deals with this stuff quite nice.
03-02-2009 10:40 AM
03-02-2009 10:46 AM
03-02-2009 11:20 AM
Can I get an example? The one I'm using from the LV examples is not working very well.
What's not working well about it? The way it's writing, or the way you're formatting the data? The example you're using is designed to open Excel, with a new workbook, and to add a sheet. If you run it again you'll get a new workbook, which is probably not what you want. You want to add a sheet for your other set of data to a workbook. You can find lots of examples in the Excel thread.
Also, I don't quite understand what you're doing with the Reshape Array function. It seems to me that all you need to do is to use a Build Array function there to get a 2D array.
03-02-2009 11:32 AM
frastrating, I tell you. I know exacly what I waht to do , but can't find out how.
All I want to do is take one of my tests, dump it to a tab in excel (with the test name in the columb) and on the next tab, have the data for another LV test. These boards are confusing to a new guy
03-02-2009 01:43 PM
Believe us, it's not our intent to try to confuse you. Also, keep in mind that you are dealing with Excel's ActiveX interface, which Microsoft designed and defined, so you can't really blame NI for Microsoft "method of madness".
You almost have all the pieces, but in order to close the loop you'll need to provide a few clarifications and additional details. You said you want to write the test results to separate sheets. You also said you wanted the test name "in the column". Which column? Or, are you trying to name the sheet to be the test name? Also, in what way do you need to have the workbooks named? Do you have individual test runs that run a suite of tests (with each test in its own sheet), and then all of that saved to a workbook?
Assuming you want to save the test name as the sheet name, and each test has its own set of data results, you could do something like the attached example. Modify as needed.
03-02-2009 02:02 PM