Jump to content

Spreadsheet String to Array function


Recommended Posts

Posted
...at this point I'm doubting of everything :wacko: .

Looks fine to me. You might want to change the representation of either the array constant or the array indicator to get rid of the implicit coersion, but other than that, it's fine.

Posted
Edit, dammit your fast Crelf! :o

That's the beauty of my RSS feed :)

Remember, formatting only modifies the reperesentation of the data. In memory, numbers all look the same.

Let's be very clear and careful about the terms we use here: formatting does not modify the representation of the data - the representation of the data is not the same for all numbers. Representation refers to whether a number is a DBL, SGL, U32, I64, etc, and that's very important. What formatting does do is modify the way the data is displayed, and not the actual number itself.

Posted
Hope you can help me to find what I'm doing wrong, please see the small attached vi. I'm just trying to convert spreadsheet string to an array of numbers with 1 digit precision but I don't know what I'm doing wrong, I think the format string input is o.k but I'm at this point I'm doubting of everything :wacko: .

Hi,

I think your problem is that you are using the wrong decimal point.

Try the formatting string "%.;%f" instead. This willl force LabVIEW to use a period as decimal character.

In my opinion it is good practice to always specify the decimal character explicitly, since different computers can have different settings.

There is also no need to tell LabVIEW to only read 1 decimal, since it is only a matter of display.

/J

Posted

Hi,

thanks for your fast answers. Yes, by changing the "format&precision" parameters to 1 digit precision the array values are shown the way I'd like but still there is a problem, in fact the function is rounding the decimal to 0, please see attached image file.

thanks again,

Jose.

post-662-1166461902.jpg?width=400

Posted

Hi,

don't worry crelf, the key is that if you see the spreadsheet string, for example first value is 7.0 and the first array value also is 7.0, no problem so far but the second value from the spreadsheet string is 7.3, and here are my doubts, the corresponding value of the array is 7.0 so they don

Posted
for example first value is 7.0 and the first array value also is 7.0, no problem so far but the second value from the spreadsheet string is 7.3, and here are my doubts, the corresponding value of the array is 7.0 so they don

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.