LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do i convert a spreadsheet string to an array of double with out using spreadsheetstringtoarray.vi?

Hi

When I use spreadsheet string to array on a spreadsheet string, I get zeroes in between the numbers. The original string has a number, a tab, and another number and I want it convert to double precision format retaining the spreadsheet string format.

How can I do this?

Thank you.
0 Kudos
Message 1 of 19
(3,867 Views)
Could it be that you have more than one tab in a row between your numbers? Please attach one of your data files so we can have a look.

There are many ways to do this, I prefer "scan strings for tokens" because it ignores empty tokens by default. You probably need two loops, an outer one to get the lines and an inner one to get the values.

You could also "clean-up" your string by removing duplicate separators before feeding to to spreadsheed string to aray.

Message Edited by altenbach on 05-16-2005 06:57 PM

0 Kudos
Message 2 of 19
(3,865 Views)
Hi

Here is a sample file for which to have a look at.

Thank you.
0 Kudos
Message 3 of 19
(3,862 Views)
adrianT
Could you tell me what was wrong with my answer to your previous post ?

CC
Chilly Charly    (aka CC)
0 Kudos
Message 4 of 19
(3,850 Views)


@chilly charly wrote:
adrianT
Could you tell me what was wrong with my answer to your previous post ?

CC


Hi

Nothing. i worked it out.

Thank you.
0 Kudos
Message 5 of 19
(3,848 Views)

@adrianT wrote:


@chilly charly wrote:
adrianT
Could you tell me what was wrong with my answer to your previous post ?

CC


Hi

Nothing. i worked it out.

Thank you.


So what's your question about here ? It's apparently the same problem with the same set of data. Or had you difficulties with the convertion from the cleaned string array to a double array ?

CC

Message Edited by chilly charly on 05-17-2005 05:47 AM

Chilly Charly    (aka CC)
0 Kudos
Message 6 of 19
(3,847 Views)


@chilly charly wrote:

@adrianT wrote:


@chilly charly wrote:
adrianT
Could you tell me what was wrong with my answer to your previous post ?

CC


Hi

Nothing. i worked it out.

Thank you.


So what's your question about here ? It's apparently the same problem with the same set of data. Or had you difficulties with the convertion from the cleaned string array to a double array ?

CC

Message Edited by chilly charly on 05-17-2005 05:47 AM







yes
0 Kudos
Message 7 of 19
(3,843 Views)
You should have tell me. Here is a slight modification.

And don't forget to rate good answers 😉

CC
Chilly Charly    (aka CC)
0 Kudos
Message 8 of 19
(3,840 Views)
Hi

Thanks for that.

But your method produces just one column of data. I need two.


Thank you.
0 Kudos
Message 9 of 19
(3,834 Views)


@adrianT wrote:
Hi

Thanks for that.

But your method produces just one column of data. I need two.


Thank you.


When I use the vi on the data you provided, I get two columns. You can see that by yourself on the attached vi, where I have saved the calculated results as default values (there is an additionnal modification to read directly a file). Are you making tests on different sets of data ? Could you give me an example of what's returned by my vi. Or are you using a modified version of my vi ? In this last case, could you post it ?

CC
Chilly Charly    (aka CC)
0 Kudos
Message 10 of 19
(3,830 Views)