From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I generate an excel report with string and numbers?

Hello,
I tried to use "Write To Measurement File". The objective is to write "Pass" or "Fail" in the measured data, in an attempt to make it easy to read the results. So far I've been able to write "0" or "1". I'm using Linux.

0 Kudos
Message 1 of 3
(2,225 Views)

Hi gubobshow,

 

WriteToMeasurementFile will only write numeric values to your file.

 

When you want to write "Pass"/"Fail" into your file you should use WriteDelimitedFile instead… (Or use ArrayToSpreadsheetString and WriteTextFile.)

 

What's the point in using a string to hold a numeric value? Why is this "Pass" local variable a string? (Why do you use local variables here instead of a shift register?)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(2,217 Views)

An "Excel Report" is a file written in the proprietary format used by Microsoft Excel, and has the extension .xls or .xlsx.  Another file format that LabVIEW supports, the (<tab> or comma) delimited Spreadsheet, with a .csv extension, can be created by the "Write Delimited Spreadsheet" function on the File I/O Palette, or simply by doing the appropriate series of writes to Text Files.

 

Bob Schor

0 Kudos
Message 3 of 3
(2,170 Views)