06-12-2012 03:35 AM
hi guys,
I am using a "read fom spreadsheet file vi" in a program to read a table but it turns all numbers in the table just with their significant digits. I need at least 6 precision digits, but I really was not able to find the solution to do that. how could I adjust it? By the way, I could not see any adjusting function by right-clicking both "read from spreadsheet.vi" and array indicators, even in their "properties". I attached the vi.
Solved! Go to Solution.
06-12-2012 03:51 AM
Hi newbie,
- did you set all indicators to show more digits?
- what decimal separator does your system use? Did you check the format string input of ReadSpreadsheetFile? Did you read the context help to know what "%.;" means?
06-12-2012 05:01 AM - edited 06-12-2012 05:01 AM
@GerdW wrote:
Hi newbie,
- did you set all indicators to show more digits?
- what decimal separator does your system use? Did you check the format string input of ReadSpreadsheetFile? Did you read the context help to know what "%.;" means?
- As I said before, I could not see any function to set indicaters to show more digits even I enter to their properties. I attached a print screen of properties of an indicator array.
-the system use "." dat as a decimal indicator. How can I check format string of ReadSpreadsheetFile?
06-12-2012 05:09 AM
@GerdW wrote:
I changed the all "," in the txt file with ".". After this change, labview program read all values in the txt correctly. Thanks.Hi newbie,
- did you set all indicators to show more digits?
- what decimal separator does your system use? Did you check the format string input of ReadSpreadsheetFile? Did you read the context help to know what "%.;" means?
06-12-2012 05:23 AM
From the Help on Read From Spreadsheet File:
Try setting the "format" to "%.6f".
If you are still having problems, attach your data file so we can try it out.
steve
06-12-2012 05:32 AM - edited 06-12-2012 05:32 AM
hi stevem181,
I thought the problem was not relevant the format of the "read from spreadsheet.vi". I have never changed the format of this vi. Once I changed all "," in the txt file with ".", the vi starts to read digits of precision correctly. Thanks.
@stevem181 wrote:
From the Help on Read From Spreadsheet File:
Try setting the "format" to "%.6f".
If you are still having problems, attach your data file so we can try it out.
steve
06-12-2012 05:33 AM - edited 06-12-2012 05:35 AM
Hi Newbie,
in your picture you only looked at the array properties. You have to look at the porperties of the numeric indicators instead... Doh.
The format string has been explained by now.
I would recommend to use "%,;%f" to read your original files (with comma as decimal separator). Read the help for those format codes!
Edit: I wouldn't call it "solution" when I had to edit all my textfiles before loading them in LabVIEW...
06-12-2012 05:50 AM
@GerdW wrote:
Hi Newbie,
in your picture you only looked at the array properties. You have to look at the porperties of the numeric indicators instead... Doh.
The format string has been explained by now.
I would recommend to use "%,;%f" to read your original files (with comma as decimal separator). Read the help for those format codes!
Edit: I wouldn't call it "solution" when I had to edit all my textfiles before loading them in LabVIEW...
Thank you. I thought it was relevant to operation system decimal seperator choice, but it is clear now. thank you again.