extracting columns of string array 2D according to the first item of each column

Hello

I have an array of strings 2D and I want to extract the columns according to the string value to items in each column to formulate a new 2D array. for example:

in the joint excel table sheet a 2D. I need to extract all contain columns "CA/S -" string and "MS/s" to formulat + another array of strings 2D form columns that contain only 2 string values.

Thank you very much and I would reaally any input apperciiate

See you soon,.

Mostafa

Something like that?  I had to convert your Excel file into a CSV file.

Tags: NI Software

Similar Questions

  • Extract the first letter of each word

    Hi all

    I have a requirement to extract the first letter of each word as shown in the example below
    input: abcd output: a
    input: abcd efgh output: ae
    input: abcd efgh ijkl output: aej
    any help will be much appreciated

    I'm on the 11g version of the db

    Depends on your definition of a "word", but for example:

    SQL> select trim(regexp_replace(' a abcd efgh ijkl','(\S)\S*\s*','\1'))
      2  from dual
      3  ;
    
    TRIM(REGEXP_REPLACE('AABCDEFGH
    ------------------------------
    aaei
     
    
  • How to select the first item in an array in a loop FOR

    Hello.

    I use Labview 8.5

    In my application, I have a loop 'for' where I read some values from a device. (strings and digital)

    As you know Labview 'stores' values up to what the loop 'for' is completed, and then they come out in a table.

    Ok.

    I want to just use the first element for strings and digital and then do something with it, like to compare (for digital)

    For strings, I used successfully 'Split 1 D Array' and choose 'everything first subarray'. Good.

    Now for digital that works too, but the result is an element, array type too. I need to be digital (decimal) is not no table type, because I need to compare (greater than 0). Then use a case...

    So, table of an element in a digital decimal? Or the table at the first decimal element. How?

    I tried also with the subset of the table. Even think. Labview won't let me compare a table 1 d with 0. It makes sense, but how to convert, to have the first decimal element?

    Try to use the 'Index Array' function. If you do not connect to the terminal of the index value, it will return the first elelemnt in the table. If wire you an index, it will return the value specified.

    Ben

  • Find the first row of each column

    Hi all

    Request:

    I want to find the first line in the text frame columns.

    Bug:

    If the active document contains a single column, two columns, and multiple column text blocks. In this case, I'm not able to get my result

    Try the script:

    myDoc = app.activeDocument var

    var myTextFrames = myDoc.textFrames.everyItem () .getElements)

    for (i = 0; i < myTextFrames.length; i ++)

    {

    var myTextColumns1 = myTextFrames [i] .textColumns [1] .lines [0] .silence

    Alert (myTextColumns1)

    }

    Attached, I have attached the error file.

    If the active document contains only two block of text column, script executed successfully.

    If the active document contains the single column text block and the sampling error two columns of text as below:

    Screen Shot 2013-03-27 at 3.31.16 PM.png

    Could someone find solution for my application.

    Thanks in advance

    BEGINNER

    Try this,

    myDoc = app.activeDocument var

    var myTextFrames = myDoc.textFrames.everyItem () .getElements)

    for (i = 0; i

    {

    for (var j = 0; j)

    {

    var myTextColumns1 = myTextFrames [i] .textColumns [j] .lines [0] .silence

    $.writeln (myTextColumns1)

    }

    }

  • Divide the string into rows according to the space

    I'm using Oracle 11.2.0.3.  I need a faster way to divide the organization names based on space as possible just using SQL.

    with org as

    (

    Select 1 org_pk, org_nm 'ALL american, INC.' of any double union

    Select org_pk 2, org_nm "COMPANY A.G" Union double all the

    Select org_pk 3, org_nm "GROWTH FUND SPONSORS and SONS, Inc." of the double

    )

    Select * org;

    Result, I need is

    1. ALL THE

    1 american

    1, INC.

    2 A.G

    2 COMPANY

    3. THE GROWTH

    3 FUND

    3 SPONSORS

    3 and

    3 WIRES,

    3 INC.

    Thank you very much.

    You can use GROUP BY with LISTAGG or XMLAGG. And ordinalite allows to preserve order:

    with org as)

    Select 1 org_pk, org_nm 'ALL american, INC.' of any double union

    Select 2 org_pk, 'A.G COMPANY' org_nm of all the double union

    Select org_pk 3, org_nm "GROWTH FUND SPONSORS and SONS, Inc." of the double

    )

    Select org_pk,

    x.org_nm,

    x.o

    org,.

    XMLTable)

    "ora: tokenize(.,"").

    by the way ' ' | org_nm

    columns

    path of varchar2 (4000) to org_nm '.'.

    o for the ordinalite

    ) x

    where x.org_nm is not null

    /

    ORG_PK ORG_NM O
    ---------- ------------------------------ ----------
    1 ALL                                     2
    1 American 3
    1 ,INC                                    5
    2 A.G                                     2
    2 COMPANY 4
    3 GROWTH                                  2
    3 FUND                                    3
    3 4 SPONSORS
    3 and                                     5
    3 SONS,                                   6
    3 INC.                                    7

    11 selected lines.

    SQL >

    However, I would like to use SUBSTR/INSTR plain + CONNECT BY if the volumes are large or performance is important.

    SY.

  • How can I extract a series of CDs of music with the same title, but each with its own number of CD?

    I have a set of 5 CDs of music, all with the same title but different disk numbers. Ripping the first is good, but when I try to rip the second I get a message that this title was torn. Each CD shows her number, but not in the title line. I guess the CD numbers aren't playing. How can I solve this problem and have all 5 CD end up in Media Player?

    Hello

    You can change the title of rip for CD1, CD2 and CD3 etc. Later, try to rip from CD & check if the problem occurs.


    Reference:
    rip music from a CD

    Hope the helps of information.

  • How to compare one by an element of a column with the first column in the other table?

    Hello

    I have two files into a single file has only Id numbers and the second file has table with for example the column 4, and his first column identification number.

    So I want to compare the first item in the User.ID file with the 1st column all the table file items in this column until it finds matches.

    If compare match then LED will be IT other wise LED will be OFF.

    Here as an attachment, I've attached the two file.

    Please guide me how can I do the same thing.

    Thank you much in advance.


  • Question to the first image in a clickable column/line

    Hello

    I hope someone can help. I created a page in lines and columns. All images are a hyperlink in each cell. For some reason, the first image of each line is not clickable, while the rest of them are. I've been in the Inspector, and I can't find the problem. http://store.skeeterz71.com/

    Thank you

    First photo not clickable

    not-clickable.jpg

    Clickable second photo

    clickable.jpg

    There is no need for you to get all hostile. I appreciate you pointing me in the right direction...

  • Table row of string to string array column

    Perhaps, it's getting late... However, I can't figure out how to convert my string column to a line string.  That said, I read the other articles and none of them are solutions to my problem.  Please see the jpg files to see what I mean.

    So on the front panel, I have a "row" chain control  However, when I save on my .dot (word template) file, it spits out a column of data.  Because this column contains my column headers, I need them to display as a line.  Someone has suggestions on how to "force" it to show in the model as a line instead of a column?

    Never mind the help.  I found a solution to the problem.

    While everyone knows... If you want to change the deminsions of a string array simply use the function "reshape array" in the tool range.  Deminsion size is the number of lines and the bottom is the number of columns.  Just wire to the top and go!

    -------------- to

    -

    -

    -

    -

    -

    -

    -

    and vice versa.

    David

  • Column data reading according to the number of lines

    Hi guys,.

    I am currently stuck on the problem of recovering the data from my database (MS Access) according to the number of lines, he has at any time (without having to know how many lines there will be during the programming of this part).

    First, I show how my program works. I'm working on an automated food, order and after the customer has chosen his power, system information such as the name of the food, quantity and price of the food will be written to the MS Access database table. (for example table name "Orderingtable" in MS Access) For my case, 1 order of food will occupy 1 line of the database table. In other words, as part of the same, if he orders 3 different foods, 3 rows will be filled in my database table.

    I would then get the part number of 'Quantity' for each order of the database and summarize the amount finally to count the total number of orders in the table of database at any time. This addition of result will be then shown on the Panel before informing the customer how many orders waiting's just prior to his order. In this case, it can get out if he wants to, if the number of orders is too big for its waiting time.

    However, I do not know how many lines my 'Orderingtable' will be 'Orderingtable' because both accumulate lines and data lines until being command to remove. Therefore, I cannot predict how many lines I program the party totals the number of quantity for each line.

    Is it possible that I can get the part of the 'quantity' without having to know the number of rows in the database so that I can count the total number of pending orders just by adding up the value of the quantity for each line?

    I do not wish to "code" my program by limiting the tables of database for us are going to say, only 50 lines at any time.

    Attached below, this is how my database table "Orderingtable" looks at, which will be used to extract the 'Quantity' column so that it can count the total number of orders and be shown/shown on the front panel of my Labview program.

    I hope that you are able to help me!

    Thank you so much in advance.

    See you soon,.

    MUI

    You can also use the SUM function:

    SELECT SUM (Quantity) OF the order WHERE Queue_No = %d

    And no need of an "Order By" clause, if you add just the quantities.

  • How can I combine a string array and an array of integers?

    I have an array of string data [to use as header] and an entire table of multiple column vakues; I need them together in a single file.

    Am not able to combine so that I could write them in a single file.

    There are several ways you can do.  What I recommend is:

    1. Open the file
    2. Use the table to a spreadsheet string to transform your headers into a single string
    3. Write it to the file.
    4. Use the table to a spreadsheet string to transform your digital data in a single string
    5. Write it to the file.
    6. Close the file
  • Array of strings of text written in the worksheet in LabView 8.0

    Hello

    I've used LabView 8.5 to perform the next action, but as I am now working on another system I'm currently forced to use LabView 8.0 (Windows XP) and would like to avoid the upgrade to LV8.5 +. However if I can't do the following so I'll have to!

    I am wanting to create a worksheet and I use the 'Write to worksheet File.vi' block in LabView. However, as I want to have included column headers, I build an array of strings using the block 'building the table '. This table is then injected into the entry "1 D data" on the block "write to the worksheet. The format for the spreadsheet block is defined by a string with '%s' to enter the entrance of "Format". In LV8.5, the table connects well, but in LV8.0, when I connect the output of the array of strings to the 1 d data entry, the wire becomes broken. The same happens when I use the 2D data entry.

    If I don't do something wrong, how can I put headers in my spreadsheet file? Is it possible in LV8.0, or should I upgrade?

    Thanks for the help!

    There are also detailed instructions on the block diagram of the writing on a file spreadsheet on how to modify it to write strings. Be sure to save it under a new name and in a new location.

  • Master-detail-shape; Hide/show columns in the form of details according to the column

    Hello

    I have a form master detail. In the long form, I have the columns:
    ID, MASTER_ID_FK, PC_SOURCE, A_C1, A_C2, A_C3, B_C1, B_C2, B_C3

    The PC_SOURCE of the column must be a LOV with values
    NULL VALUE
    A
    B

    So if I choose or enter a master record the detailed form appears and I can enter one or more detail records.

    PC_SOURCE is the first column.
    If I choose one, the columns B_C1, B_C2, B_C3 should disappear as there should be no possible entry.
    If I have B, A_C1, A_C3, A_C2 columsn should disappear as there should be no possible entry.

    Is this possible?

    I tried a bit of my own, but without success. I tried to put in the first column (lov SOURCE PC) in the attributes of the element a javascript call like onChange = "do_Refresh('#PC_SOURCE#'); »

    The javascript funktion do_Refresh tries to grab the value of the column and the value of a hidden item P1_SOURCE as document.getElementById('P1_SOURCE').value = v_source;

    But this does not work, because there is not the value of the recovered column.
    And probably can´t work because of more lines of a detail.

    Thank you and best regards,
    Matthias

    Hello

    The html code of your detailed form will be an array of the elements of entry with names f01, f02, etc.. The columns of the key of the fields are normally hidden, so your PC_SOURCE column will probably use the name f03. A_C1 column name will be f04 etc.

    Once you have the input names for your columns, you can create a dynamic action (DA) to hide the items you want.

    You want the DA to fire when any element PC_SOURCE is changed if you want when to be:
    Event: change
    Selection type: jQuery Selector
    jQuery Selector: input [name = "f03"]
    Condition: no strings attached

    The action is to hide an element in the same line, if the changed item is a value. The action must therefore:
    Action: Run the JavaScript Code
    Fires when the event is: true
    Code: if(this.triggeringElement.value=="A") {$x_Hide ('f04_' + this.triggeringElement.id.split ('_') [1])}

    You then need a lot of real actions for each item that you want to hide.

    Rod West

  • The extract number and String and replace with space

    Hello

    I need to extract number and string of a data table. I use Oracle 8i

    For example: 001FI025A, 001PDIT002, 001UXSV029AA
    I want to separate as follows
    001 025 A FI

    001 002 RESULTED

    USXV 029 A 001


    How can I achieve this? Any help is very useful.

    Thank you

    Hello

    Welcome to the forum!

    You must change "001FI025A" to the name of the column. Example:

    SELECT '001FI025A',
           SUBSTR(TRANSLATE('001FI025A',
                            '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ',
                            '0123456789                          '),
                  1,
                  INSTR(TRANSLATE('001FI025A',
                                  '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ',
                                  '0123456789                          '),
                        ' ')) AS ELEMENT_1,
           SUBSTR(LTRIM(TRANSLATE('001FI025A',
                                  '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ',
                                  '          ABCDEFGHIJKLMNOPQRSTUVWXYZ')),
                  1,
                  INSTR(LTRIM(TRANSLATE('001FI025A',
                                        '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ',
                                        '          ABCDEFGHIJKLMNOPQRSTUVWXYZ')),
                        ' ')) AS ELEMENT_2,
           LTRIM(SUBSTR(TRANSLATE('001FI025A',
                                  '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ',
                                  '0123456789                          '),
                        INSTR(TRANSLATE('001FI025A',
                                        '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ',
                                        '0123456789                          '),
                              ' '))) AS ELEMENT_3,
           LTRIM(SUBSTR(LTRIM(TRANSLATE('001FI025A',
                                  '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ',
                                  '          ABCDEFGHIJKLMNOPQRSTUVWXYZ')),
                  INSTR(LTRIM(TRANSLATE('001FI025A',
                                        '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ',
                                        '          ABCDEFGHIJKLMNOPQRSTUVWXYZ')),
                        ' '))) AS ELEMENT_4
      FROM DUAL;
    

    Kind regards

  • Counting of string separated by commas in the cells of a column

    Hi all

    Try to pass some of my Excel spreadsheets in numbers. I'd appreciate help with a specific string of text/number in the cells in a column. In the example below (no sheet of complete works) is a column, the packs work (WP01, WP02 and so forth)-which means work packs a particular Test & Validation document (e.g. TV-102) applies to.

    I would like to be able to simple counting the number of occurrences, say "WP05", is applicable. If I use COUNTIF, on the "WorkPack" column, he has only the cells that contain only the string "WP05" (i.e. in the sheet, I work with, I know there are 22 entries for "WP05" in the column of pack work, but only the 14 account)

    Note: I am building this on my MAC, but would like to be able to access and use these sheets on my iPad - don't know if that makes a difference.

    Any suggestions / ideas?

    Thank you in advance...

    ATB Perry

    ID

    Paper group

    WorkPack

    TV-91

    Validation of NFR

    WP05 WP06

    TV-102

    Certificate of conformity

    WP05 WP06

    TV-103

    Validation of NFR

    WP05 WP06

    TV-206

    Test EN

    WP05

    TV-207

    Test EN

    WP05

    TV-208

    Test EN

    WP05

    TV-209

    Test EN

    WP05

    TV-212

    Certificate of conformity

    WP01, WP02 WP03, WP04, WP05, WP06, WP07, WP08 MICROSOFT WINDOWS CURRENTVERSION, WP09, WP10, WP11, WP12, WP13, WP14, WP.15

    TV-213

    Validation of NFR

    WP01, WP02 WP03, WP04, WP05, WP06, WP07, WP08 MICROSOFT WINDOWS CURRENTVERSION, WP09, WP10, WP11, WP12, WP13, WP14, WP.15

    TV-214

    Test EN

    WP01, WP02 WP03, WP04, WP05, WP06, WP07, WP08 MICROSOFT WINDOWS CURRENTVERSION, WP09, WP10, WP11, WP12, WP13, WP14, WP.15

    TV-215

    Validation of NFR

    WP01, WP02 WP03, WP04, WP05, WP06, WP07, WP08 MICROSOFT WINDOWS CURRENTVERSION, WP09, WP10

    TV-308

    Validation of NFR

    WP01, WP02 WP03, WP04, WP05, WP06, WP07, WP08 MICROSOFT WINDOWS CURRENTVERSION, WP09, WP10, WP11, WP12, WP13, WP14, WP.15

    TV-338

    Test EN

    WP05

    Here's how I would approach (without more):

    Add additional columns to your table (those titled "WP01',"WP02", etc.).  Enter the names as shown

    The first line is a heading row.

    Also... Add an extra line at the end and make a footer row

    D2 = (LEN ($C2) −LEN (REPLACE ($C2, D$ 1, ""))) ÷LEN ($1 D)

    It's shorthand dethrone select cell D2 and type e (or copy and paste it here) the formula:

    = (LEN ($C2) −LEN (REPLACE ($C2, D$ 1, ""))) ÷LEN ($1 D)

    Select cell D2, copy

    Select cells D2 the bottom of column R, paste

    in the footer row (row 15 of this example) iff the following formula:

    D15 = Sum (D)

    Select the cell D15, copy

    Select the cells D15 thru R15, dough

    I could never find 22 WP05 instances (even when I search your message on this web page):

Maybe you are looking for