08-08-2017 01:31 PM - edited 08-08-2017 01:33 PM
I'm trying to utilize a hard coded spreadsheet in the VI below and allow the user to select which row of the value to call out. Trouble is that the program is not able to read the value at any given row and would return a value of "0" no matter the rows selected.
Solved! Go to Solution.
08-08-2017 01:44 PM
You need to change your format specifier from %d to %f.
However, you are making this way too complicated.
See below.
mcduff
08-08-2017 01:44 PM - edited 08-08-2017 01:48 PM
08-08-2017 01:46 PM
@mcduff wrote:
However, you are making this way too complicated.
Depends on where the data is coming from.
08-08-2017 01:46 PM
1. Set your delimiter to be a comma (,). The Spreadsheet String To Array defaults to use a tab.
2. You probably want to use %f as your format, which is for a floating point. Write now you have %d, which is for an integer. Therefore the scan currently ends at the period.
08-08-2017 01:49 PM
You need to specify the comma delimiter.
Not needed in this case since there is a new line in between values, if it was all one line then yes. Parses correctly in LabVIEW 2017 without comma delimiter.
Main Problem %d specifier, not %f (There are other problems as you have noticed.)
cheers,
mcduff
08-08-2017 01:51 PM
08-08-2017 01:55 PM
@mcduff wrote:
@aputman wrote:
@mcduff wrote:
However, you are making this way too complicated.
Depends on where the data is coming from.
From the OP
a hard coded spreadsheet
Should be able to change that to an array of numbers
mcduff
I understood that statement completely different. A string is not a "hardcoded spreadsheet".
08-08-2017 02:00 PM
I have strange interpretations of words, sorry.
Hard coded to me meant it was stuck inside the code. (Also previously the OP posted a VI in another thread that had the same/similar VI as the one posted here throughout it. That may be biasing me a bit. They weren't reading from an instrument, file, etc.)
cheers,
mcduff
08-08-2017 04:10 PM
wow you guys even went through my past questions, that's impressive.
But yes I am trying to in some way hard code the values as so users won't somehow alternate the given values unless purposely doing so.