LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Save test data in the Microsoft Excel

My current program is save Expect Value, Actual Value, and Average Value in the text file. But I'd like to change my code to save Expect Value, Actual Value, and Average Value in the Excel file. EX. Expect Value, Actual Value, and Average Value are three difference colum, and I will write detail value in the row cell under the three colums. Could you please give me sample code to write test results in Excel using CVI 5.5. Thanks.
0 Kudos
Message 1 of 4
(4,450 Views)
Hi ge-NPI,

Please refer to the CVI excel example programs in:
<CVI Install DIR>\samples\activex\excel

Regards,
0 Kudos
Message 2 of 4
(4,419 Views)

Hello, James

I got the sample code to create/close an Excel table, but how can I write test results into each cells?

Thanks

GE-NPI

0 Kudos
Message 3 of 4
(4,416 Views)
You need to use the function ExcelRpt_SetCellValue. Check out this thread for some more details.
 
[edit:] More specifically, you'll need a to write a double:
ExcelRpt_SetCellValue (ws_handle, cell , ExRConst_dataDouble, 123.456);
and here is a better example I posted a while back.

Message Edited by Ian W on 02-27-2007 09:31 PM

0 Kudos
Message 4 of 4
(4,404 Views)