Write Continuous Data to Spreadsheet CSV with Headers
LabVIEW & MULTISIM LabVIEW & MULTISIM
14.8K subscribers
9,740 views
0

 Published On Jun 11, 2022

#learnlabview

Description
Deprecation notice

This example was written with LabVIEW 2012 and uses the Write to Spreadsheet File.vi which has since been replaced with the Write Delimited Spreadsheet.vi. This example should still run and serve as a tool for learning how to write CSV data with headers. However, if you are building a new application, it is suggested that you update these functions to the supported Write Delimited Spreadsheet.vi function.



Overview

This example shows how to use the Write to Spreadsheet VI to write data to a Comma Separated Value (CSV) spreadsheet file which can be read in Microsoft Excel.





Description

This VI uses the Write to Spreadsheet VI to write a CSV file. The code is separated into four parts. First, the header information is written to the CSV file. Next the channel names are written to the CSV file. Lastly, inside the While Loop, the Random Number (0-1) VI is used to simulate data generation and then these random values are written to the CSV file.





Requirements

LabVIEW 2012 (or compatible)





Steps to Implement or Execute Code

1. Choose where you would like to store the file

2. Fill out the Header Info array with the header information for your output file.

3. Fill out the Channel Names array with the names of your data channels

4. Determine how many channels of data you want to write and how many values will be written per channel

5. Run the VI

6. Navigate to the file path you provided to see the CSV file the VI created


#LearnElectronic
#learnProgramming
#futureTechnology

show more

Share/Embed