From 11:00 PM CDT Friday, May 10 – 02:30 PM CDT Saturday, May 11 (04:00 AM UTC – 07:30 PM UTC), ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From 11:00 PM CDT Friday, May 10 – 02:30 PM CDT Saturday, May 11 (04:00 AM UTC – 07:30 PM UTC), ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
04-23-2009 04:34 PM
Hi
I am a beginner(use LV 7.1) and can’t cope with one issue. I’d pleased if anyone help me and provide me with more precise info.
I have to built a graph in Excel using data from VI. I’ve seen the Excel Macro example, but stuck using macros.
Thanks in advance.
04-23-2009 05:17 PM
04-24-2009 02:22 PM
Hello,
A simple way to do this is the Write to Spreadsheet File.vi. If you have the Report Generation toolkit however, we can better customize your report and use the express VI's that come with it. If you do have it, take a look at the Generate Report From Template (Excel).vi. Let us know how you want the data to appear.
Regards,
Anna K.
04-24-2009 03:52 PM
I tried to write a macro in Excel, but didn't succeed. I don't have Report Generation toolkit.
to Anna K.: how can I cope with graph, using only Write to Spreadsheet File.vi?
and new problem: When I run the Excel Macro Example, Error 97 occurred at Unknown System Error in Set Cell Value with Range.vi->Excel Macro Example.vi.
04-24-2009 05:20 PM
The Write to Spreadsheet File will generate a text file with delimited columns. This file can be opened by Excel, but it will not be an Excel workbook. Thus, you cannot add a graph to it unless you resave it as a workbook.
Error 97 is a null refnum. This can happen if there was a problem opening Excel. Does Excel actually open and create a new workbook when you run the example?
If you need to save your data to an Excel workbook one thing you may want to consider is to use an Excel template that has a graph already in it. This way, you just need to update the cells with new data.
The Excel API is a bit cumbersome. If you're going to need to do a lot of work with it, then I recommend looking over the Excel thread, as that has a lot of examples (including a user-created toolkit).