05-24-2021 04:10 PM
Hi,
I am trying to import excel data into a LabView VI and from some reading that I did online, I figured the best way to do that would be to use the Read Delimited Spreadsheet VI. I am using LabView version 2020.
This VI is extremely simple at the moment. All I am doing is inputting the excel spreadsheet into the VI's file path node and then displaying all its rows on the front panel. I read that the VI cannot interpret a .xlsx file and requires a .txt file in stead so that is what I am inputting. There is very little room for error here, but I cannot get to read the data.
I am attaching pictures of the block diagram and the output on the front panel (it shows all zero values) below. If anybody could please take a look at them and help me figure out what I am doing wrong, that would be really great!
Thank you!
05-24-2021 04:14 PM
Your text file... is it tab delimited?
05-24-2021 04:25 PM
Yes, it is tab delimited.
I am still extremely new at LabVIEW as you might be able to tell.
Do you have any idea what the problem here could be?
05-24-2021 05:07 PM - edited 05-24-2021 05:15 PM
@viamotors wrote:
Do you have any idea what the problem here could be?
Yes, we could solve the problem in a millisecond if you would attach a zip file containing your text file and VI.
(Is it really a simple text file or did you just change the extension of the excel file to *.txt? How does it look like in notepad?)
(Alternatively, we can stare for weeks at your picture and guess a million possible reasons. Not worth it!)
And no, it does not show "zero values". It shows an empty 2D array! Do you know the difference between orange and blue? Did you actually press the run button?
05-24-2021 05:39 PM
Thank you so much!
I am attaching the .vi and the .txt file.
The text file is a very basic 2 column, 10 row spreadsheet that I made just to test the read function was doing what I wanted it to do. I made it originally on excel and then saved it as a tab delimited text file.
05-24-2021 05:45 PM
05-24-2021 05:54 PM
Yes!!
Did you add this VI to a new project? Could it possibly be a project related error?
05-24-2021 05:56 PM
@viamotors wrote:
Did you add this VI to a new project? Could it possibly be a project related error?
No.
05-24-2021 05:58 PM - edited 05-24-2021 06:00 PM
Oh, what is your OS? From your path formatting, it is not windows.
Did you use the browse button to fill the path control?
Is the file local or on a network location?
05-24-2021 06:01 PM
Ah! I had the files saved in different folders on my desktop. Pu them in the same folder and it worked. Not sure if that is what was causing the issue but it's working now. Thank you for your help!