Example Programs

cancel
Showing results for 
Search instead for 
Did you mean: 

Read Data from Spreadsheet (.csv) and Display in LabVIEW

Overview

This example will read a .csv file and display it in an array indicator.

 

 

Description

This example shows how you can use the Read from Spreadsheet VI to pull data from a spreadsheet. In order to directly read Microsoft Excel files we need to use the Report Generation Toolkit (examples in Help»Find Examples), but in Excel you can save a spreadsheet as a Comma Separated Value file (CSV) and you can read that using the Read from Spreadsheet VI.

 

While this example will not necessarily work for all formats of spreadsheets, it demonstrates the usage of the delimiter and should be a good starting point to build an application.

 

To Write to a CSV Spreadsheet file check out this example: Getting Started: Write Continuous Data to Spreadsheet (CSV) with Headers

 

 

Requirements

LabVIEW 2012 (or compatible)

 

 

Steps to Implement or Execute Code

  1. First save your spreadsheet as a csv file Click here for help doing this in Microsoft Excel. Or use the csv File in the Zipped Folder
  2. Unzip the attached folder "Read From Spreadsheet_LV2012_NI Verified.zip" to your computer and Open the Read from Spreadsheet VI

  3. Set the path to your csv file

  4. Set the My File has Row Headers switch to on

  5. Run the VI

 

Additional Information or References

Front Panel

Front Panel.PNG

 

Block Diagram

 

BD.PNG 

 

 

 

 

**This document has been updated to meet the current required format for the NI Code Exchange.**

Comments
Member streetpoet
Member

really helpful.

Member juanitoing84
Member

¿Where is MyData.csv?

Member Horus91
Member

thanks you

Member syrpimp
Member

Create a dummy file with extension name .csv to evaluate this program



Thank you & Best regards
syrpimp

=======================================================
“You must continue to gain expertise, but avoid thinking like an expert." -Denis Waitley
Member Corelab
Member

How do you get it to read both characters and numbers from all the rows. Each row has columns mixed with both characters and numbers and this just takes the number out to display besides the first row.

Member dilaekayati
Member

How to get an fft from csv file ? I have vibration sensor data in csv from excel file. The 1st column is time data, the 2nd column is the data itself. This is my email dilaekayati@gmail.com . I've tried many fft function , but none of them show the fft  i really want.my fft project.jpg

Member dilaekayati
Member

here is the front panel result when i run the block diagram :

my fft project fp.jpg

Member Meins321
Member

can you upload your version somewhere? thank you!

Member abouMouadh
Member

thank you for this helpfull exemple it's a very good explanationSmiley LOL