Showing results for 
Search instead for 
Did you mean: 

read from excel and plot xy graph

yup i have done but my graph is still wrong


heres my vi and csv file


Download All
0 Kudos
Message 11 of 29

Some comments:

  • A "Comma-separated Values" file (with the extension .csv) is not an "Excel" file.  It is an ordinary Text file with lines of text corresponding to "rows" in an array, and a separator character (here a comma, hence the name) separating "columns" of data in a 2D array.
  • "Excel" files have extensions like .xls or .xlsx (note the "xl" in the extension, and the name of the Microsoft name, "Excel").  When Microsoft (no relationship to the company that makes Excel) created Windows, they created an Icon that looks very similar to the icon for Excel (.xls and .xlsx) files for files with the .csv extension (a non-Excel Text File).  This confuses many LabVIEW programmers ...
  • Have you looked at your .csv data file?  Specifically, have you looked at "Column 1", the "time" parameter?  Have you noticed that three or four rows have the same value?
  • What can you say about the data?  How are they acquired?  How precise is the timing?
  • Do you want to reconsider plotting data where one parameter ("time") appears to be "under-precise" and hence unreliable?  Is there an assumption you might want to make (like "sampled at regular time intervals"), then a computation that can quantify this assumption?  Perhaps there's a better way of displaying regularly sampled data than a graph.  [Hint -- look at the Front Panel "Graph" Palette].
  • Spend some time with the LabVIEW Tutorials on plotting data.

Bob Schor

0 Kudos
Message 12 of 29

hi i have changed my csv data but my graph x axis still cant seem to read from the timestamp.

please help me to take a look 

Download All
0 Kudos
Message 13 of 29

Hi jasper,


this new CSV file basically has the same content/formatting as the one attached at the start of this thread.

So also my suggestion from message #3 still applies…


(The only difference in the new CSV file is the additional (but empty) column due to those trailing comma in each line/row!)

Best regards,

using LV2020 on Win8.1+cRIO
0 Kudos
Message 14 of 29

Is this what you expect to see?  [I did this quickly, so the time is "elapsed time" since the start of the data ...]

For JasperFor Jasper

Bob Schor

0 Kudos
Message 15 of 29

nope i only need data from 8am-9am using this csv file 

0 Kudos
Message 16 of 29

Hi Jasper,


quick adaption of my previous suggestion:


Using just the "nice" part of your data to determine the dt…


Your latest CSV is still malformed, see the last lines in the file:



1/11/2019 8:59,349.78,
1/11/2019 8:59,359.3,
1/11/2019 8:59,361.73,
1/11/2019 8:59,355.94,
1/11/2019 9:00,381.69,
1/11/2019 9:00,392.2,
1/11/2019 9:00,390.48,
1/11/2019 9:00,385.22,
2/11/2019 9:00,394.93,
3/11/2019 9:00,405.88,



The last line contains empty cells.

There are still empty cells in column 2.

The two lines before the last line contain just one sample per day, while the data before are sampled at 4 samples per minute. This will give "not so nice" looking graphs and makes it harder to use waveforms…


Recommendation: Save the data using more precision in the timestamps!

Best regards,

using LV2020 on Win8.1+cRIO
0 Kudos
Message 17 of 29

Hello guys need help with xy graph which read from the excel file and able to prompt the ambient temperature and also the irradiance(w/m^2) respectively in a single program using only 8-9am data. I have attached an excel file below. Thank You!

0 Kudos
Message 18 of 29

Hi Jasper,

You have previously created a trend on this from the LabVIEW forums

Bob and Gerd have previously posted the solutions for your problem when I look through the trend... 

Do refer to this link here I attached

Attached the VI and detail what problem you are facing with the VI instead so that we could help you from there...

0 Kudos
Message 19 of 29

I suggest you get a firm understanding of the basics of LabVIEW first before attempting on writing a VI....

0 Kudos
Message 20 of 29