LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert dat

Solved!
Go to solution

Good morning, my problem is the following, i have a file of excel and extract information all in string but when i need use the information use how string, dbl and convert this string to dbl whit frac/exp string to number, and whit this information initialize variables and intenting making a cluster that have string, dbl and different dats but when i put the unbundle don't show the names and don't make the cluster are you have this problem?

0 Kudos
Message 1 of 6
(3,022 Views)

Many questions, which you could have helped to answer by attaching, say, an example data file (or a first attempt at a VI to handle your task).

  • You mention an "Excel" file.  Is this truly Excel (extension .xls or .xlsx) or a text file laid out in spreadsheet format (rows and columns, separated by tabs or commas)?
  • Let me assume you have a Spreadsheet File (Data.csv).  You can read it in with Read Delimited Spreadsheet (be sure to configure the column separator character, as LabVIEW uses <tab> by default).
  • I recommend you read it in as a 2D string array.
  • Do you know about For loops, and how they can allow you to process an array, presenting a dimension one at a time (i.e. put a 2D array in, and get the data a row at a time)?
  • I recommend you look at Extract From String -- it is easier to use one function which can handle many string formats than having to pick and choose specific "to Dbl" or "to Integer" functions, and I like the fact that it has Error In and Error Out.

Bob Schor

0 Kudos
Message 2 of 6
(2,997 Views)

Basicaly I already hace the data extractracted from an excel file but I have to say 5 data of which I receive it as a string but for certain reasons I want to convertí 2 of them to dbl since I use it as reference parameters and I also want it to be a function for I want to convert it into a cluster but with 2 types of data anda manage it, but even doing tests I cannot generarte a cluster

0 Kudos
Message 3 of 6
(2,976 Views)

Thank you so much Bob

0 Kudos
Message 4 of 6
(2,971 Views)
Solution
Accepted by topic author Mike2708

You are using Bundle by Name.  That means you MUST wire an example of the cluster into the middle node of that function.  Make sure every element of that cluster constant has a name.

 

Or you could use a regular Bundle.  It will create a cluster based on the names of the wires running into it.

 

You should read the detailed help for both the Bundle by Name and regular Bundle functions.

0 Kudos
Message 5 of 6
(2,968 Views)

Ok Bob, thank you so much your reply solve my doubt

0 Kudos
Message 6 of 6
(2,955 Views)