From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

reading a value from spread sheet

Hi,

                      Can you please suggest how to select a particular spreadsheet file out of three files  and read values from the selected spreadsheet file.

 

Thanks in advance

0 Kudos
Message 1 of 8
(2,775 Views)

I'll give you 2 clues to make what you want.

 

1. You can use File Dialog function for selecting the spreadsheet file.

2. You have a direct VI to Read from Spreadsheet.

 

Lets see how you make it.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 2 of 8
(2,772 Views)

Hi,

 

I guess it depends on if the files are user selectable or if you want LV to automatically select the correct file to load?

 

Either way, opening the spreadsheet is easily done with the normal LabVIEW vi's.

 

Darren.

0 Kudos
Message 3 of 8
(2,761 Views)

You can use read from spreadsheet.vi to perform your task.

0 Kudos
Message 4 of 8
(2,749 Views)

Yes, but....

 

It also depends on what the format is of the actual file. Some people will create ta-delimited text files with the .XLS file extension and Excel will sometimes open them without complaining - thus leading to the impression that they are really spreadsheet files.

 

So the first question is are the files really spreadsheet file, or text files that you can open with a spreadsheet. 

 

If it's the later, please pardon my interruption...

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 5 of 8
(2,712 Views)

Hi,

      Actually the file is a spreadsheet file stored as .csv file and it contains an array of values.

0 Kudos
Message 6 of 8
(2,694 Views)

Did you give a try what I have suggested? Its straight forward, please check and comeback if you face any issue.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 7 of 8
(2,685 Views)

Hi,

Please find attached VI, 2 files and code image (if you do not have labview 2010), one is.CSV file and other is without extension (can be opened in notepad).

just run the VI, it will ask you to browse the file and then it will display data inside the file in an array.

 

Miraz....

Kudos is better option to thank somebody on this forum.Smiley Wink

With Regards

Miraz
Kudos is better option to thank somebody on this forum
------------------------------------------------------------------------------
Message 8 of 8
(2,675 Views)