LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error reading xls file

  Why the simulation is not accepting the data iam trying to give.

 Why Does the "Read Waveform From File.vi" Behave Differently in the Run-time Engine?

 what is the solution for this.Can you explain please.Iam also adding the vi file and the excel file I'm using.

 Regards
 Bharath
Download All
0 Kudos
Message 1 of 27
(4,754 Views)
You cannot use Read Waveform From File to read an Excel spreadsheet. Read Waveform From File is designed to read files that were created using Write Waveforms To File.

Where did your data come from?


Message Edited by smercurio_fc on 04-25-2008 12:45 PM
0 Kudos
Message 2 of 27
(4,737 Views)
Thanks for reply.
            
             My data is external.It is taken from one simualtion in matlab.
             How do i read that data that is in text or Excel format.
             Can you please tell me a way?
Bharath
0 Kudos
Message 3 of 27
(4,721 Views)
If the data is in Excel then you need to use ActiveX. The easiest way to do this is to have the Matlab code save the data as a text file, using tabs between columns if you have more than one column, though your sample data shows only 1 column. Then just use the VI Read From Spreadsheet File. Note that "spreadsheet" doesn't refer to an Excel file - it refers to a spreadsheet-like formatted text file. That function returns a 2D array, since it assumes multiple columns. However, if you have just one column, then just use Index Array to get the first column:



Check the LabVIEW Help for more information on Read From Spreadsheet File.


Message Edited by smercurio_fc on 04-25-2008 01:09 PM
0 Kudos
Message 4 of 27
(4,711 Views)

If you save the file as tab separated text, then the code below will read the file and display the waveform.



Message Edited by Dennis Knutson on 04-25-2008 12:15 PM
0 Kudos
Message 5 of 27
(4,704 Views)
Bharath,

Note that Dennis is showing you a waveform graph, while the example I provided used a waveform chart, which is what you initially were using. Both are valid - you will need to decide which method is more appropriate for you.
0 Kudos
Message 6 of 27
(4,695 Views)
Thanks for your valuable replies.
Dennis,where do i get the last block (you've written 'DBL' in it.).
I've been searching but i am missing it.
0 Kudos
Message 7 of 27
(4,684 Views)

You don't know where to find a waveform graph?

 

Please spend some time at http://www.ni.com/academic/lv_training/how_learn_lv.htm

Message Edited by Dennis Knutson on 04-25-2008 12:42 PM



Message Edited by Dennis Knutson on 04-25-2008 12:44 PM
0 Kudos
Message 8 of 27
(4,679 Views)
Hi Dennis,

                 I tried the simualtion you are given.It is giving the waveform but a portion of it  only showing. Any time only 1023 samples of data is coming. That too it is coming from 17111 to 18134.I tried to change all the axis and scaling even then it is not changing. I am attaching the text files with tabs inside the elements. Can you please explain me the reason or can you send me the spread sheet file you've given for the simulation.
 
 Thanks
 Bharath.


 
Download All
0 Kudos
Message 9 of 27
(4,635 Views)

We cannot see any of your images, because they point to your hard drive which is not public. Please attach images first.

Please attach your data file, so we can see why it reads only 1k points.



Message Edited by altenbach on 04-26-2008 09:16 AM
0 Kudos
Message 10 of 27
(4,630 Views)