From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
05-12-2010 12:28 AM
Hi Friends,I had created one Spreadsheet file. In that i had lot of integer values. I ve to read the integer values from a spread sheet.. How to do it?
I am new to this environment.Please help me out
05-12-2010 01:57 AM
Hi deepak.aamecece,
where do you have problems with your vi? Are you using "Tab (\t)" as delimiter in your spreadsheet file? If not, then you should change it to the delimiter you use.
Mike
05-12-2010 02:38 AM
05-12-2010 04:25 AM
Hi Friends,,, I got the answer... One surprice thing i noticed. I had written code to read datas from spreadsheet file. The code was executed and i got the answer correctly in Vista OS. But the same code was copied and run in another system which is run by Windows XP OS. The problem is I couldn't get the answer in the second system.Why is it so? I was very surpriced....
I attached the screen shot of my program...
05-12-2010 05:56 AM - edited 05-12-2010 05:58 AM
05-12-2010 06:19 AM
05-12-2010 08:18 AM
Are you actually trying to read an Excel spreadsheet file (your screenshot shows an .xls extension)?
Write and Read Spreadsheet File VI's do not work with Excel files, only text files that are formatted in a spreadsheet-like format with delimiters and end of line characters.
If you file is actually a text file, then you shouldn't name it .xls because it is not an Excel file. It should be named with a .txt, or .csv, or something else.
05-13-2010 12:35 AM
Hi Friends... I got your point...
This is the first step i did...Actually i had created a .xls file using MS Excel Manually(Manually i sense created us MS office function not thro labview program). i had pushed some numerical datas while creating it.
Second Step:
Then i had written code in labview to read the datas what i pushed in it. Eventhough the code i had written correctly i couldn't retrieve the datas from excel sheet using Read from Spreadsheet.vi function..I couldn't undrstand why is it so?
Third step:
Then i created that file using function in labview and pushed datas to that file using labview too. then only i can read dats from the dats using Read from Spreadsheet.vi function..
Finally i got the answer for my application need friends...
I am having one doubt. I am creating one txt file manually. i.e using notepad. I used the same function "Read from Spreadsheet.vi" in labview. this time this function retrieves numerical datas correctly at first time itself without requiring third step as i mentioned above. For this i am not forced to create that file (.txt) using functions in labview. Moreover Labview function read only first column values. couldn't read the row datas.. My Question is: Why this happens for txt files? Are you got my point?
I had attached screenshots and xls file for your reference..Thank you one and all for ur response..
05-13-2010 04:38 AM
Hi deepak,
this has been asked numerous times before and always have been given the same answer:
A xls-file is not the same as a spreadsheet file! A xls contains (among other things) also spreadsheet data, but it isn't a spreadsheet file...
If you would open the xls generated with LabVIEW you would see that it is actually a simple txt file - the only point is it contains data as "tsv" (tab seperated values). Just because you name something xls it doesn't become a proper xls file...
To read data from (real) xls files you need to use ActiveX, also often to be found in the forum. To easily distribute data to Excel use csv or tsv formatted textfiles...
05-13-2010 05:09 AM