String of letters to 1-D Array of strings for spreadsheet

What I would like to do is be able to take this string as it is the A's and B's that are being generated as the program runs,
I would like to take this string and get it into file in delimited tabs just as the numbers are. If there is a created 1-D array of
strings that works, but that is controlled on the front panel, I would like to create this from data that is comming in. In other words
I am stuck on how to create a 1-D array of Sting from the string value comming in. I want to do this so that I can get all the different
values A's or B's into the different tab fields. As it is they are comming all up in the first column and not "tabbing" Please see the
attached file in the rows 5 an
d 7.
Thanks,
Brian
Attachments:
Array_of_strings_to_spreadsheet2.vi ‏28 KB
Turn_data1.xls ‏1 KB

Brian
You need to convert your string to contain single tabs as separator. The problem is that your string is "dirty", i.e. it contains a variable amount of spaces to seperate the items. If you strictly had single space separators, you could just replace all spaces with tabs.
"Scan string for tokens" by default does not allow empty tokens, thus takes care of the multiple spaces.
The attached simplified code assumes a fixed number of items (12), if this is a variable, you need to use a while loop and sense the end of the input string. Let me know if this is clear.
LabVIEW Champion . Do more with less code and in less time .
Attachments:
StringToArrayofstringsToSpreadsheetstring.vi ‏21 KB

Similar Messages

  • Search Array of String for exact match words

    I need to create a search feature.
    There will be a textfield where the user will input a word or words.
    Then I need to check if the are any reference in the array of names.
    namesArray ["ocean in the sky", "cean on sky", "cean is white"];
    keywordsArray ["cean", "sky"];
    matchCounter = 0;
    If I input the word "cean" I dont want in my results "ocean in the sky", only "cean is sky".
    I have the following code:
    for (var j:int = 0; j < namesArray.length; ++j)
         var tempStr:String = namesArray[j];
         for (var k:int = 0; k < keywordsArray.length; ++k)
              if (tempStr.indexOf(arrayKeywords[k]) != -1)
                  matchCounter++;
         if(lengthKeywords == matchCounter)
              trace("yeahhh... there's a match!!");
         matchCounter = 0;
    Is there a better way? How can I do this?

    There are few things but the main problem is that "new RegExp()" needs double escapes ("\\")
                var namesArray:Array = ["ocean in the sky", "cean on sky", "cean is white"];
                var keywordsArray:Array = ["cean", "sky"];
                for (var j:int = 0; j < namesArray.length; j++){
                    var matchCounter:uint = 0;
                    var tempStr:String = namesArray[j];
                    for (var k:int = 0; k < keywordsArray.length; k++){     
                        var regExp:RegExp = new RegExp("(\\s+|^)" + keywordsArray[k] + "(\\s+|$)"); 
                        if (tempStr.search(regExp) > -1){
                            matchCounter++;
                    if(keywordsArray.length == matchCounter){
                        trace("\"" + namesArray[j] + "\" matched all the keywords");
    Traces:
    "cean on sky" matched all the keywords

  • Type defined array of clusters for holding configuration data - setting default values for each array element

    Hi,
    I was wondering if I could get some information and opinions about using a type defined array of clusters to hold configuration data.  I am creating a program to test multiple DUTs and wanted to have a type defined control for each DUT containing the information needed to create the DAQmx tasks for all of the signals for that DUT.  I am wanting to do this so that the data is hard-coded and not in a file that the user could mess up.
    The type def controls are then put in a subVI that chooses the appropriate one based on the DUT Type enumeration wired to a case structure.  
    I am having problems with the type defined control.  I am seeing issues when attempting to save a unique configuration to each array element in the array of clusters.  Somehow it worked to begin with, but now clicking "Data Operations --> Make Current value default" on individual elements of the cluster or the entire cluster (array element) is not saving the data when I re-open the type def control.  What am I doing wrong?  Am I trying to do something with arrays of clusters that I should not be doing?
    I have attached one of the type defined controls for reference.  I tried changing it to Strict to see if that helped, but no luck.
    To reproduce, change the resource string for array element 0 and make the new value the default value.  Then close the type def, and re-open it.  The old value is still present in that element.  The VI is saved in LabVIEW 2012.
    Solved!
    Go to Solution.
    Attachments:
    CM_AnalogInputs.ctl ‏11 KB

    Values of a typedef are not proprigated to instances of the control. THey will pick it up if created AFTER the data values have been changed. THey will not get updated with future changes. You should either create a VI specifically for hardcoding your values or implement a file based initialization. The file based would be much better and more flexible. If you don't want users to modify the data simply encrypt it. There is a noce blowfish library you can download.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • Scan string for "returns"

    Hi,
    I have a multi lined string and want to put it as list into a listbox (i
    did it with a for loop and the "i"attached to the line index of the
    "pick line" vi) but now a have let my for loop know how many rounds it
    must do! How can scan a multi lined strings for "number of lines"?
    Regards Thijs

    Thijs,
    Use the "Spreadsheet String to Array" function (in string functions). Wire
    it as follows:
    format string: string constant containing "%s"
    spreadsheet string: your string
    array type: (empty) array string constant
    delimiter: string constant containing enter ("\n" with string in code
    display mode)
    The output "spreadsheet" is an array with strings that can be wired to the
    attribute node of the listbox.
    Important notice: \n is not the same as \r ! If your string comes from a
    ..txt file, this can cause unexpected results!
    Regards,
    Wiebe Walstra.
    AIR technical Automation.
    By the way, Thijs. If your in the Nederlands, maybe you'd like to visit our
    annual LabVIEW meeting, PierVIEW. This also applies to the rest of the
    group. Check out www.air.nl, and follo
    w PierVIEW 2001.
    AIR technical Automation
    www.air.nl
    "Thijs Boeree" wrote in message
    news:[email protected]..
    Hi,
    I have a multi lined string and want to put it as list into a listbox (i
    did it with a for loop and the "i"attached to the line index of the
    "pick line" vi) but now a have let my for loop know how many rounds it
    must do! How can scan a multi lined strings for "number of lines"?
    Regards Thijs

  • "Scan String For Tokens" weird behaviour

    I am trying to carry out the simple task of getting a string with
    comma delimiters and produce a string_array with the values in between
    the commas; this would simplify calling the different parts of the
    string.
    Example:
    INPUT: this,is,an,example
    OUTPUT: this|is|an|example (this would be an array of strings)
    Using a while loop with the two VI "Scan String For Tokens" and
    "Insert to array" should be enough to carry this task. I started
    using a FOR loop as the number of tokens I´ll be using is fixed.
    However I wanted to make the subVI more general by allowing any
    #tokens in the input string and using the token index with a WHILE
    loop to do this. The "token index" output from the "Scan String For
    Tokens" is said to be use
    d in a while loop to process the whole
    string.
    However,I´m getting -1 as an output even if I´ve got more tokens left
    and the while loop therefore exits.
    What am I doing wrong?
    Should I use -2 as the comparison to decide whether I´m at hte end or
    not of the string?
    Cheers and TIA

    Check the offset for -1, not the token index. (See attached image). If course if this is a multiline string, the you also need /n etc as delimiter.
    If the string ends in a delimiter, you need to clip the last array element. I usually use "reshape array" with the output from [n] as input.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    ScanForTokens.gif ‏17 KB

  • Arrray of strings into spreadsheet

    hi,
    Pls help me in writng the array of strings into spreadsheet (.xls)
    I have 3 or 4 different 1d array of strings and i have to put each array of string into differnet coloumn....
    thanks

    Does it have to be an actual xls file or will a CSV (which can be read directly from Excel) file do?
    If a CSV will work, combine all of the arrays into a 2D array.  You will likely need to use Transpose 2D Array.  Then use Array to Spreadsheet String with a comma as the delimiter.  Write the new string to a text file.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How can I convert a Waveform to a String-For​mat?

    Hello,
    I write with "SQL-Execute.vi" datas to an Access-file. The "SQL-Execute.vi" needs a statement in String Format. And that is my problem. My source-datas (that I want to save to Access) are Waveforms. How can I convert the Waveform datas to a String Format?
    Thanks for help!

    Wire the waveform to the Get waveform componants function...from that you get t0, delta t and the sample values. Now you can generate whatever string you want based on that information...
    You could e.g. wire the Y array to a for-loop in which you calculate the time of each sample by taking t0 and adding delta t multiplied with the array index, then you could convert the Y value and the time to strings using the seconds to time string and number to fractional string functions...etc etc...
    MTO

  • [svn:bz-trunk] 11030: Tweak the deserialization of ASObjects to treat an empty string for the type of an object as null .

    Revision: 11030
    Author:   [email protected]
    Date:     2009-10-20 11:35:02 -0700 (Tue, 20 Oct 2009)
    Log Message:
    Tweak the deserialization of ASObjects to treat an empty string for the type of an object as null. It appears that there is some logic in the LC remoting code that relies on a non-null class name to always exist. This change reverts to the old behavior of not allowing empty string as a value for the ASObject.namedType.
    This should fix bug 2448442 and its duplicates caused by the recent serialization changes.
    I don't think this is the perfect fix. Pending further investigation, a better fix would be either:
    a. If it's OK to assume that empty string should always mean null for the type of the ASObject, the code that enforces it should be in the setter/getter inside ASObject and not in the deserializer.
    b. ASObject doesn't guarantee that a named type exists or is valid. In that sense an empty string is as bad as some random characters that cannot be a valid class name in java, so depending on how disruptive it may be, the fix should be in any logic that uses ASObject.getType().
    Modified Paths:
        blazeds/trunk/modules/core/src/flex/messaging/io/amf/AbstractAmfInput.java

    Hi Pavan,
    "In your payload there is no namespace prefix for the elements under PayloadHeader element."
    Yes, you are right - but this message is standard AQ Adapter Header message - it's not defined by me. I just used message which was automatically added to my project when I have defined AQ Adapter.
    "In your process is the default namespace is same as namespace value of tns ??"
    Do you mean targetNamespace? If yes it's different as it points to process "targetNamespace="http://xmlns.oracle.com/PF_SOA_jws/PF_APPS/APPS_PROCESS" (names of application and process have changed as I try different ways to do that)
    ns1 is: xmlns:ns1="http://xmlns.oracle.com/pcbpel/adapter/aq/PF_SOA/PF_APPS/PO_AQ"
    "another thing is tns and ns1 should have same values.."
    When I create a variable of header type, namespace ns1 is automatically created for it. I set it as property of receive activity. When process is instantiated on the serwer I get the error in which you can see that namespace is tns.
    Maybe I'm doing something wrong but I don't see how I could fix this in my process.
    You can see that the message I get on the server has nothing in common with the application/project/process names. Is it possible to define such variable?
    Regards
    Pawel
    PS:
    In Transformation xsl file, both variables (source and target) has tns namespace for Header and PayloadHeader, and no namespace for subfields.
    Edited by: pawel.fidelus on 2010-01-05 02:37

  • How to dynamically set connection string for report in C# code?

    Hi,
    I have installed CRVS2010. I have created new Crystal Report WPF Application and new report. I would like to set connection string for report in code dynamically.
    Is this possible?
    Thanks
    Ivana

    Lots of posts in this forum on how to set database connections. WPF should not be a consideration as it's just a viewer. The report engine is still the same. Search these forums. Use the search box at the top right corner of this page. Look at samples here:
    https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples
    Note that none of the samples above are using WPF, but like I said, the WPF is just a different viewer and will not impact how the report engine logs on to a database. (I think of it as a gray car vs. a red car. Same engine, just the color is different)
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • How to use multiple VCI strings for lap 1300 and 1200 (option 60) in one pool?

    Hi All,
    Hope to you a very happy new year,
    I have two differnt LAP 1300 and 1200 in my network and I need to add theme to the WLC,
    I successed to add one of theme by the option 60 in the DHCP pool at the Core SW,
    So my quetion is below:
    How to use multiple VCI strings for lap 1300 and 1200 (option 60) in one pool?
    Thanks in Advanced,
    Ahmed,

    To add to Scott's post.  Option 60 would be useful if you needed to put certain types of AP on specific controllers.  Otherwise, no real need to use it for the most part.
    Though, I do recall an issue a few years ago that some windows machines had issues getting DHCP if option 43 is being returned.
    Now, on an IOS switch, you can only configure one option 60 per DHCP scope
    HTH,
    Steve
    Please remember to rate useful posts, and mark questions as answered

  • Creation of input string for SHA-1 in hash total calculation

    In order to create an input string for the SHA-1 algorithm based on the REGUH table I am searching for the ABAP source code which can be used in the user exit of transaction of transaction F110 (Payment Run).
    Can anybody provide me the source code or is there a BAPI or something ?
    Please help. The problem is urgent and my ABAP engineer did not succeed so far developing the solution.
    Best regards, Edwin

    And this will get a base64 encoded hash
    select utl_raw.cast_to_varchar2( utl_encode.base64_encode( dbms_crypto.hash(utl_raw.cast_to_raw('mypass'),3) ) )
    from dual;

  • [svn] 3519: Fix typo in error string for situations where there are advanced messaging configuration settings from LCDS used in the configuration files but no AdvancedMessagingSupport service .

    Revision: 3519
    Author: [email protected]
    Date: 2008-10-08 04:17:40 -0700 (Wed, 08 Oct 2008)
    Log Message:
    Fix typo in error string for situations where there are advanced messaging configuration settings from LCDS used in the configuration files but no AdvancedMessagingSupport service. The error string said that there was no flex.messaging.services.AdvancedMessagingService registered but it is the flex.messaging.services.AdvancedMessagingSupport service that needs to be registered.
    Add configuration test that starts the server with a destination that has the reliable property set which is an advanced messaging feature but there is no AdvancedMessagingSupport service registered.
    Modified Paths:
    blazeds/trunk/modules/common/src/flex/messaging/errors.properties
    Added Paths:
    blazeds/trunk/qa/apps/qa-regress/testsuites/config/tests/messagingService/ReliableDestina tionWithNoAdvancedMessagingSupport/
    blazeds/trunk/qa/apps/qa-regress/testsuites/config/tests/messagingService/ReliableDestina tionWithNoAdvancedMessagingSupport/error.txt
    blazeds/trunk/qa/apps/qa-regress/testsuites/config/tests/messagingService/ReliableDestina tionWithNoAdvancedMessagingSupport/services-config.xml

    Hi,
    Unfortunately I already tried all kinds of re-installs (the full list is in my original message). The only one remaining is the reinstall of Windows 8 itself, which I would really like to avoid.
    What I find really strange is the time it takes for the above error message to appear. It's like one hour or even more (never measured exactly, I left the computer running).
    What kind of a timeout is that? I would expect that, if ports are really used by some other application, I get the message in less than a minute (seconds, actually). To me this looks like the emulator itself for some reason believes there's a problem with
    some port while in reality there isn't.
    I'll eventually contact Microsoft Support, thanks for the suggestion.

  • Define Search String for EBS in SAP 4.6c

    Hi All,
    I have some question for search string for EBS in SAP 4.6c. I have already done this thing in ECC 6 and work well with "target field" as account number. but in 4.6c target field account number doesn't exist. Please suggest me, if there is a same way like account number target field in 4.6c?
    Thanks in advance
    Glenn

    Hi Shanumonu,
    Thx for the answer, you save my life!
    But I have another issued. I already implement SE11 instruction, but item with wrong note to payee number from MT940 keep cleared. Do you have suggestion for me?
    Thanks,
    Glenn

  • Show Error string for all the components in a form at a time

    How do I show all the error strings for all the components in the form when the submit button is clicked?

    This code answers your question:
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
      <mx:Script>
        <![CDATA[
          import mx.events.ValidationResultEvent;
          import mx.validators.ZipCodeValidator;
          import flash.events.MouseEvent;
          public var v:ZipCodeValidator = new ZipCodeValidator();
          public var vResult:ValidationResultEvent;
          public function performValidation():void {
            v.domain = "US or Canada";
            v.listener=myZip;
            vResult = v.validate(myZip.text);
            if (vResult.type==ValidationResultEvent.INVALID) {
              myZip.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_OUT));            
              myZip.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_OVER));
        ]]>
      </mx:Script>
      <mx:TextInput id="myZip"/>
      <mx:Button label="Submit" click="performValidation();"/>
    </mx:Application>
    If this post answers your question or helps, please mark it as such. Thanks!
    http://www.stardustsystems.com
    http://www.stardustsystems.com/blog
    Adobe Flex Development and Support Services

  • Save Query - An error occurred while creating connection strings for the query

    A workbook trying to edit and reload I get the following error "Save Query - An error occurred while creating connection strings for the query" No Power Pivot data model or anything.

    I am getting the same error when editing a Power Query in an Excel spreadsheet. It happens when I change a Group By step to do a Sum instead of Count Rows.

Maybe you are looking for

  • High Temp. AMD Video Card

    Hello,i bought my Lenovo B50-70 Laptop at 3/1/2015 (at the begin of the new year)its Spec: Intel Core i7 4510U 2GHz4 GB Ram500 GB HDD ( Toshiba)Video Card:Intel HD Graphics ( i think that it is Intel HD 4400)AMD Radeon R5 M230 i installed the newest

  • URL_DATASTORE .pdf's created with Adobe Distilller 4.0

    I am running Oracle 9i (9.2.0.1.0) on Solaris 8. I am using an Oracle text URL_DATASTORE to index pdf's, word docs, and html files. I am able to successfully index and query for all documents except for pdf's with interactive fields created by Adobe

  • PSE 7.0 on Windows 7 RC

    Has anyone tested PSE 7.0 on Windows 7 RC yet? Does it work? Thanks.

  • Creation of jar files

    i am using the command jar cvf HelloApplet.jar hello/HelloApplet*.class in my ms-dos prompt in windows xp, it displays message invalid command. Kindly help me how to create jar files in javafx in javafx sdk using dos prompt

  • Displaying current month in prompt

    Hi, I want to show the current month as the default value in Prompt in XI R3.1 Webi. i.e. when the user runs the report, the prompt for "Month" should show the current month (Say March) and if user wants to change it he can change it to someother mon