LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading spreadsheet

Solved!
Go to solution

I am trying to reas an MS Excel file using "Read From Spreadsheet File (string).vi". But could not read. See the attached image for output givrn by "Read From Spreadsheet File (string).vi".

 

 

0 Kudos
Message 1 of 9
(3,700 Views)

Could you please show the screenshot of your excel file?

 

Thanks,

Mathan

0 Kudos
Message 2 of 9
(3,683 Views)
0 Kudos
Message 3 of 9
(3,678 Views)

You cannot open an Excel file using the Read from Spreadsheet file function.  That function can only open text files.

 

In order to read a true Excel file, you will have to use ActiveX functions.

 

If you had searched the forums on this topic, you would have found hundreds to thousands of messages discussing this very fact.

Message 4 of 9
(3,645 Views)

One easy way to read an Excel file is to save it as a csv file and then you can use the Read from Spreadsheet file function with the delimeter set to ",".

 

Like Ravens said, lots of examples can be found.

-Matt Bradley

************ kudos always appreciated, but only when deserved **************************




0 Kudos
Message 5 of 9
(3,642 Views)
Solution
Accepted by topic author pritam
Thanks all of you. I could read the excel fime using excel specific VIs in report generation toolkit. find the code attached.
Message 6 of 9
(3,638 Views)

Hello everyone!!

 

I have opened my spreadsheet as txt file. I need to start a loop only after data has been read from the file and not when the program starts. How do I do that?

 

Thanks

0 Kudos
Message 7 of 9
(2,665 Views)

Hi,

 

You really should start a new thread instead of posting to a three year old one (that isn't really that relevant to your question!).

 

To answer your question - you need to understand the basics of dataflow programming. Read the labview basics and you'll see how easy this is.

 

Simply use the error wire / reference wire from your file read and connect it to your to your loop - therefore the loop will only start when your file read has finished.

 

-CC

 

----------------------------------------------------------------------------------------------------------------------------
"If anyone needs me, I'll be in the Angry Dome!"


0 Kudos
Message 8 of 9
(2,661 Views)

Hello, 

 

I have a similar problem with reading from spreadsheet. I have a .csv file that I try to read but I only get zerosin my array. I'll attach the .csv file and .vi as well if anyone is willing to take a look. All of the examples I've found have the exact same thing I have in my code, still I can't read the file properly...

 

 EDIT: Actually, it's okay, I solved my problem. I used Matlab to create the .csv file and I just tried creating a new blank .csv with copied data and now it works...

Download All
0 Kudos
Message 9 of 9
(2,505 Views)