Add a table with the number of lines and columns JS

Hello

Simple question: what is the syntax for adding a table with a specified number of rows and columns? I don't get it. (I don't know how to add them later, but I want to do when I create the table). Here is the entry in the ESTK:

Tables.Add (to: LocationOptions, reference: all, withProperties: Object): array

Creates a new table.

(optional): Data Type: LocationOptions, by default: LocationOptions.UNKNOWN
The location of the new table to the object within the container object or reference. (Optional)

Reference: Data Type: no
The reference object. Note: Required when the value specifies before or after. Can accept: Table, XmlStory, XMLElement, TextFrame, text, character, Word, line, paragraph, TextColumn, PointInsertion, story, cell or TextStyleRange. (Optional)

withProperties: Data Type: object
Initial values for the properties of the new Table (optional)

Thank you

Ariel

After much experimentation, I found this works:

t = app.selection [0].tables.add (LocationOptions.AT_BEGINNING, undefined, {columnCount:2, headerRowCount:1, bodyRowCount:5, footerRowCount:3});})

Tags: InDesign

Similar Questions

  • How to update the table with the number management

    Hello

    I need as there is a loc_tab of the created table as below,

    CREATE TABLE loc_tab
    (
    Country_ID NUMBER,
    country_code VARCHAR2 (3),
    country_name VARCHAR2 (50).
    State_ID NUMBER,
    state_code VARCHAR2 (3),
    state_name VARCHAR2 (50).
    city_id NUMBER,
    city_code VARCHAR2 (3),
    city_name VARCHAR2 (50)
    );

    I inserted records like below,
    COUNTRY_ID     COUNTRY_CODE     COUNTRY_NAME     STATE_ID     STATE_CODE     STATE_NAME     CITY_ID     CITY_CODE     CITY_NAME
    
              IND          INDIA                    TN          TAMIL NADU          CHN          CHENNAI
              IND          INDIA                    TN          TAMIL NADU          TRI          TRICHY
              IND          INDIA                    TN          TAMIL NADU          CMT          COIMBATORE
              IND          INDIA                    TN          TAMIL NADU          MDU          MADURAI
              IND          INDIA                    AP          ANDHRA PRADESH          HYD          HYDERABAD
              IND          INDIA                    AP          ANDHRA PRADESH          SEC          SECUNDRABAD
              AUS          AUSTRALIA               QLD          QUEENSLAND          BRI          BRISBANE
              AUS          AUSTRALIA               TAS          TASMANIA          HB          HOBART
              AUS          AUSTRALIA               TAS          TASMANIA          CCE          CITY OF CLEARANCE
              AUS          AUSTRALIA               TAS          TASMANIA          BUR          BURNIE
    Now, I wanted to update the table such that all ID columns are updated with running number.

    Each ID columns should get incremented so that, for Country_ID column corresponding to "India" If country_id is 1, that there must be one for all the lines with the name as "India". Likewise for "Australia".

    In the case of State, she also has the same logic with numbers repeated until the very name of the State comes.

    For the city, it of course will hold separate ID only because the name of the city will not get duplicated.

    This update must be done in the normal way using simple SQL such as no PLSQL don't like looping, etc... is involved.

    Here are the contents of the table, and that's how the table should be updated,
    COUNTRY_ID     COUNTRY_CODE     COUNTRY_NAME     STATE_ID     STATE_CODE     STATE_NAME     CITY_ID     CITY_CODE     CITY_NAME
                                            
    1          IND          INDIA          1          TN          TAMIL NADU     1     CHN          CHENNAI
    1          IND          INDIA          1          TN          TAMIL NADU     2     TRI          TRICHY
    1          IND          INDIA          1          TN          TAMIL NADU     3     CMT          COIMBATORE
    1          IND          INDIA          1          TN          TAMIL NADU     4     MDU          MADURAI
    1          IND          INDIA          2          AP          ANDHRA PRADESH     1     HYD          HYDERABAD
    1          IND          INDIA          2          AP          ANDHRA PRADESH     2     SEC          SECUNDRABAD
    2          AUS          AUSTRALIA     1          QLD          QUEENSLAND     1     BRI          BRISBANE
    2          AUS          AUSTRALIA     2          TAS          TASMANIA     1     HB          HOBART
    2          AUS          AUSTRALIA     2          TAS          TASMANIA     2     CCE          CITY OF CLEARANCE
    2          AUS          AUSTRALIA     2          TAS          TASMANIA     3     BUR          BURNIE
    Thank you and best regards,
    Shiva
  • form table - displays the number of lines using LOV static

    Hello

    I have a report in table form, in that I want to display the number of lines.
    For this I created a static LOVfor no lines and transmitted a list of values say 10; 25.50; 10,25 and 50... 1000; 1000
    but my question is that how can I display all the lines in the tabular presentation using the static lov (as having one of the values in LOV like ALL for the number of lines to display).

    can someone help me with this.

    1000; 1000... ALL; 9999999999

  • Problem with the number of lines in the channel

    Dear community LabView,

    I'm relatively new to labview and I came across a problem that (I assume) can easily be resolved with your help.

    I need to create a digital signal to trigger a camera, but I have a problem with the configuration of my lines or exit lanes. I would not use that line output to trigger the camera. (I use a card NI PCIe-6353). LabVIEW is telling me that the number of lines in the channel does not have the number of rows of data:

    Possible reasons:

    Specified read or write operation failed because the number of rows in the data of a string is not the lines in the channel.

    If you use the digital waveform data type, make sure that the number of lines in the digital waveforms is the number of lines in the channel. If you are using Boolean data, make sure that the dimension of the array for the rows of the data is the number of lines in the channel.

    Number of lines in the channel: 1
    Number of data lines: 2

    Task name: _unnamedTask<11>

    How and why the number of data rows is connected to the resolution of my analog digital converter?

    I would appreciate your help! Labview code and a screenshot attached.

    Thank you

    Beff

    I got it to work by changing the "data format" "binary not signed" OR by plugging is not the "offset" for the Square Wave VI.  I think that the default "offset binary" data format works correctly if there is a negative value.

  • Impossible to delete the partitions of a table with the number of rows is zero

    Hi all

    I want to delete all partitions on all the tables in a schema having the number of lines equal to zero.

    I use the queries below to get a solution.

    Select 'EDIT '. '' || 'TABLE ' | TABLE_NAME | 'DROP '. 'PARTITION | Nom_partition from dba_tab_partitions where TABLE_OWNER = "xyz";

    Select count (*) in the table table_name partition (nom_partition).

    Edited by: 887563 October 17, 2011 13:39

    If you trust your statistics, you can simply use the stat num_rows in dba_tab_partitions:

    select *
    from dba_tab_partitions
    where table_owner = 'MY_SCHEMA'
    and num_rows = 0;
    

    But I think what you try to get some code like this:

    declare
      v_rows number;
      v_statement varchar2(500);
    begin
      for c in (select *
                from dba_tab_partitions
                where table_owner = 'MY_SCHEMA') loop
        v_statement := 'select count(*) from '||c.table_name||
                       ' partition ('||c.partition_name||') where rownum=1';
        --dbms_output.put_line(v_statement);  --for debugging
        execute immediate(v_statement)
        into v_rows;
        --dbms_output.put_line(c.table_name||' '||c.partition_name||' '||v_rows);  --for debugging
        if v_rows = 0 then
          v_statement := 'ALTER TABLE '||c.TABLE_NAME||' DROP PARTITION ' || c.PARTITION_NAME;
          dbms_output.put_line(v_statement); --shows the drop statements
          --execute immediate(v_statement); --remove comment to execute
        end if;
      end loop;
    end;
    
  • Get the number of lines per column State, dependant on the choice, even if 0 table?

    Hi guys, am hoping someone can help with this query.

    I have 2 tables

    Search
    ----------
    code VC2 (10)
    Description VC2 (50)
    domain VC2 (50)

    MyTab
    ----------
    hour date
    VC2 status (10)

    The data should be like this:

    Search
    ----------
    B, buy, Transaction
    S, sale, Transaction
    R, back, Transaction
    O, old, to Condition
    N, new, Condition

    MyTab
    ---------
    JANUARY 1, 2008, B
    JANUARY 1, 2008, B
    JANUARY 1, 2008, B
    JANUARY 1, 2008, S
    JANUARY 1, 2008, S
    JANUARY 1, 2008, R
    JANUARY 2, 2008, B
    JANUARY 2, 2008, B
    JANUARY 2, 2008, R
    JANUARY 3, 2008, B
    JANUARY 3, 2008, S

    What I want to do, is go back a number of lines for each date in mytab, for each possible transaction situation, even if it's 0.

    If the query returns

    hour, status, County
    ----------------------------------
    JANUARY 1, 2008, B, 3
    JANUARY 1, 2008, S, 2
    JANUARY 1, 2008, R, 1

    JANUARY 2, 2008, B, 2
    JANUARY 2, 2008, S, 0
    JANUARY 2, 2008, R, 1

    JANUARY 3, 2008, B, 1
    JANUARY 3, 2008, S, 1
    JANUARY 3, 2008, R, 0

    So because there are 3 rows of transaction status in the lookup table, you always get 3 rows returned BY DATE in the table mytab.

    Is it possible without using loads of trade unions?

    Thank you!

    Scott

    Published by: Scott Hillier on November 5, 2008 15:24

    Nicolas-

    I don't think that you need a self-join.

    (my apologies for the bad formatting, cannot understand the syntax of the citation!)

    with
    list of choices like
    (select code 'B', 'Buy' descr, area of "Transaction" of union double all the)
    Select' code, descr 'Sell', 'Transaction' of all field double union
    Select code 'R', 'Return' descr, area of 'Deal' of all the double union
    Select ' o ' code, descr 'Old', 'Condition' field of dual union all
    Select "n" code, descr 'New', 'Condition' field of the double),
    MyTab as
    (select to_date (January 1, 2008 "," MON-DD-YYYY "") transdate, status 'B' of all the double union)
    Select to_date (January 1, 2008 "," MON-DD-YYYY "") transdate, status 'B' of all the double union
    Select to_date (January 1, 2008 "," MON-DD-YYYY "") transdate, status 'B' of all the double union
    Select to_date (January 1, 2008 "," MON-DD-YYYY "") transdate, the from ' Union status double all the
    Select to_date (January 1, 2008 "," MON-DD-YYYY "") transdate, the from ' Union status double all the
    Select to_date (January 1, 2008 "," MON-DD-YYYY "") hour, status of 'R' of all the double union
    Select to_date (January 2, 2008 "," MON-DD-YYYY "") transdate, status 'B' of all the double union
    Select to_date (January 2, 2008 "," MON-DD-YYYY "") transdate, status 'B' of all the double union
    Select to_date (January 2, 2008 "," MON-DD-YYYY "") hour, status of 'R' of all the double union
    Select to_date (January 3, 2008 "," MON-DD-YYYY "") transdate, status 'B' of all the double union
    Select to_date (January 3, 2008 "," MON-DD-YYYY "") transdate, the from ' double status)
    Select trunc (a.transdate), c.code, count (decode(a.status,c.code,1))
    mytab a.,
    Search c
    where c.domain (+) = "Transaction".
    Trunc Group (a.transdate), c.code
    order of trunc (a.transdate);

    TRUNC (A.TRANSDATE) CODE COUNT (DECODE(A.STATUS,C.CODE,1))
    ------------------------- ---- --------------------------------
    1 JANUARY 08 B 3
    1 JANUARY 08 R 1
    1 JANUARY 08 S 2
    JANUARY 2 08 B 2
    JANUARY 2 08 S 0
    JANUARY 2 08 R 1
    JANUARY 3 08 B 1
    JANUARY 3 08 R 0
    JANUARY 3 08 S 1

    9 selected lines

  • How to find how many times, how many numbers in a range of numbers (number of lines and columns) has been repeated (numbers 3.6.2)

    Hello

    I have a range of numbers from B2 - B11 until the G2 - G11. For example:

    31

    7

    28

    10

    4

    17

    20

    13

    44

    2

    1

    39

    32

    45

    39

    4

    10

    25

    26

    38

    27

    43

    12

    3

    42

    35

    37

    1

    34

    21

    13

    39

    11

    14

    5

    37

    21

    33

    34

    4

    13

    10

    31

    14

    1

    24

    35

    3

    20

    2

    24

    27

    22

    30

    10

    34

    36

    32

    3

    27

    I would like to know who among these numbers have occurred and how many times. For example (just to have as an example): number 10 repetitions 5 times, number 13 repeated 3 times, 24 repetitions 9 times.

    Repeats = duplicates.

    I want to know all the repetitive number and how many times they repeat.

    Is there some kind of formula I can use to get there. It would be good to have the sorted result. For example:

    32 repeats 10 times

    24 repeat 9 times

    6 reps 8 times

    5 repeat 7 times

    22. repeat 6 times

    10 repeats 5 times and so on.

    Hello

    Problem of three steps:

    1. Determine the distinct values
    2. Count the number of times each appears in the table
    3. Sort by value or frequency (or both).

    The first step is easily handled by copy separate Automator Service, a Service of Automator, written by SGIII. A link to the file in post June 21 of the SG in this thread: Re: Analyzing column (maybe not the correct wording)

    After downloading and installing the service, select the cells containing the numbers, call the service, and then select the first regular (ie. non-header) cell to a new table and the dough.

    (The following assumes the new table has a header row, no column header, and you have selected - click - cell A2 before pasting.)

    You will get a list of distinct numbers in a single column (A2 - A34, of your sample and support of note).

    To count the numbers:

    In this example, the existing table is named 'Table 1'

    Enter the following formula in B2 the new table, and then fill up to the last line of the column B:

    = COUNTIF (Table 1::B:G, A)

    Results should be as shown:

    Sort the results on column (value) or B (frequency)

    Two types (A, then B) will be put in order of frequency, with values appear the same number of times sorted by value within this group.

    Kind regards

    Barry

  • AutoComplete in the subject line of the email in google no longer works. Gmail allows you to work with the autocomplete object line and unresponsive.

    Somewhere in the Google and Firefox updates history of matter does not remember the common topics that I use every day. The auto saved type me the subject line every time I send repetitive messages and mail to different groups. Not online forums seem to have an answer, but many have the problem. I don't know if it's a browser issue or a problem of Google.

    Follow the suggestions mentioned in the following articles:

    Check and tell if its working.

  • Programmatically set the size of a table control (not the number of col and lines)

    Hi all

    I am trying to create a little VI, in which the user selects the number of columns and rows in a table, and after clicking on a button 'OK', the table control is displayed in the control panel (to be filled in by the user). To do this, I use the nodes property to the number of columns and lines. I have no problem with that.

    However, I want to "limit" the size of the control table (control of himself, not the dimensions of the table) and make use of vertical and horizontal table, the scroll bars. I want to avoid it is that passes type 100 user and 100 lines and appears a huge table control.

    I could tho this by using an array instead of an array, via the node property "size", but I would use an insead table a table.

    Thank you very much

    Daniel

    With a table control, you cannot set the display size to be anything other than a multiple of a complete cell.

    If you are limited to a number of lines and columns.  If you want to resize with more control you also need to resize the control within the Bay, accessible via the property 'picture Element '.

    Another option (but seems huge exaggerated) is to place your table in a secondary and set the size of the secondary to the size you need and enable scrollbars for her.  It is not an option that I would choose but if it helps...

    Have it, your description of your user interface sounds not very intuitive.  How the user knows at any time exactly what cell they access if they have to scroll backwards?

  • divide the table based on the number of lines

    Hello

    I am trying to split a table based on the number of lines and then treat.
    Say I have a TEST_XXX table that contains 50 lines, what I would do is.
    to access multiple lines of 10. How can we achieve this?

    What I thought is, once the table is created and the line are filled.
    Add a new column to the table and perform a procedure that inserts of 1 to 10 first lines
    and 2 to 10 lines and 3 to 10 next ranks... etc. Based on this, that we can treat
    the first set of lines then play next or etc...

    is there a better way to do it?

    Code to create the table:
    CREATE TABLE TEST_XXX
    (
      A_ID   VARCHAR2(10),
      B_ID   NUMBER,
      c_ID   VARCHAR2(10),
      D_ID   NUMBER
    )
    Code to add lines:

    DECLARE
    BEGIN
      FOR I IN 1..50
      LOOP
          INSERT INTO TEST_XXX VALUES('ABCDE',123,'ZYXWV',321);
      END LOOP;
      COMMIT;
    END;
    The original problem is, I have a huge table, and I write a sql query to process,
    When I treat him by selecting all the values in the table, it is very slow.
    But when I have treat small Coulon (say 100 rows), it works very well.
    That's how I got the approach described above in mind.

    You can use NTILE.

    See:
    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14200/functions101.htm#SQLRF00680
    http://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:47910227585839

  • How do I dynamically change the the number of vCPU and amount of a virtual computer memory?

    Hi all

    My first question is how do I dynamically change the number of vCPU and amount of a computer virtual memory when the virtual machine is running? If so, this may be achieved by writing a few scrpits to inform the hypervisor?

    My second question is, I can start a virtual machine in KVM with the number of vCPUs and amount of memory configured in the startup script. I don't know if this is supported in vmware ESXi?

    I couldn't find the answer in the ESXi 5.0 user guide.

    Your suggestion will be highly appreciated.

    Cheng Wang

    http://sparrowangelstechnology.blogspot.com/2012/11/hot-add-of-CPU-and-memory-to-virtual.html

    You can change the ram and the CPU, but it must be enabled.

    by default, only it isn't.

    See this link to change the settings of vm via powercli

    http://ICT-freak.nl/2010/05/07/PowerCLI-script-to-schedule-memory-and-or-vCPU-updowngrade/

  • BI Publisher - how to display the number of lines displayed at the bottom of the table on each page

    Hello

    We are the conversion reports Actuate BEEP and not able to understand how to view "Accum.Total = < n >" at the bottom of each page. In the attached report to operate it, "Accum.Total = < n >" must be displayed at the bottom of each page where < n > is the number of lines displayed on the current page and previous page.

    For example, if there are 10 rows in the result set, if the 1st page displays 4 rows, 2nd page displays 3 rows and 3rd page is 3 lines and then Accum.Total = 4 on page 1, Accum.Total = 7 on page 2 and Accum.Total = 10 on page 3.

    Note that we use the property table "allow the lines to break Pages = False" as we do not want a specific line can be split across pages.

    I enclose a sample of report actuate, rtf, BEEP and XML report for testing file.

    Approach used so far-

    1 > I tried to put the counter in the footer, but it seems that only the fields that come directly from the IC can be used on the header/footer. No matter what form text field or variables defined in the report.

    2 > I used approach given in the link below. Using this approach, I am able to view a coded value hard at the bottom of every page (just below the table) but his does not work for the variable (in my case the counter c1).

    https://blogs.oracle.com/xmlpublisher/entry/continued

    3 > on Google, I found a few articles on the page break conditionally as display only certain numbers on a page or the page by section break but in our case, its dynamics and its number of lines to display on a page is driven by data, so I could not think of a certain condition to use in "Condition." ": If" for use as a page break.

    Thank you

    Richa

    Watch see the-Report

    http://docs.Oracle.com/CD/E28280_01/bi.1111/e22254/create_rtf_tmpl.htm#do_bf_cf

    Download the https://blogs.oracle.com/xmlpublisher/entry/continued sample

    Add

    <>

    name = "contd_footer".

    format = "99G999G999" / >

    After the field "Footer."

    If need to use a footer to display the meter then and sous-modèle with code above and call it in footer

  • OGG-01028 object with the number of the object 80673 is compressed. Compression of the table is not supported.

    (1) I received an email like this:

    Event_alert

    2013-09-17 22:00:16 ERROR OGG - 01028 Oracle GoldenGate Capture for Oracle, ext_1.prm: object with the number of the object 80673 is compressed. Compression of the table is not supported.

    2013-09-17 22:00:16 ERROR OGG - 01668 Oracle GoldenGate Capture for Oracle, ext_1.prm: PROCESS ABENDING.

    (2) I have not found the OBJ

    SQL > select OBJECT_ID, OBJECT_NAME from dba_objects where object_id = 80673;

    no selected line

    (3) change a few times the process EXT recover;

    (4) my excerpt settings

    Cat ext_1.prm

    EXTRACT ext_1

    Ogg, ogg PASSWORD USERID

    TRANLOGOPTIONS EXCLUDEUSER ogg

    SETENV (NLS_LANG = AMERICAN_AMERICA. ZHS16GBK)

    -SETENV (NLS_LANG = AMERICAN_AMERICA. AL32UTF8)

    EXTTRAIL ./dirdat/t1

    DYNAMICRESOLUTION

    TABLE YBK.*;

    This is a bug that has been fixed

    Excerpt from abending with Table of Compression is not supported, even if the database has no tables compressed. (Doc ID 1510691.1)

    event text: Oracle GoldenGate Capture for Oracle, ext_1.prm: object with the number of the object 86173 is compressed. Compression of the table is not supported.

    tableexclude *. DBMS_TABCOMP_TEMP *.

  • How to export data to excel that has 2 tables with the same number of columns and the column names?

    Hi everyone, yet once landed upward with a problem.

    After trying many things to myself, finally decided to post here...

    I created a form in form builder 6i in which clicking on a button, the data gets exported to the excel sheet.

    It works very well with a single table. The problem now is that I cannot do the same with 2 tables.

    Because the tables have the same number of columns and the columns names.

    Here are the 2 tables with column names:

    Table-1 (MONTHLY_PART_1) Table-2 (MONTHLY_PART_2)
    SL_NOSL_NO
    MODELMODEL
    END_DATEEND_DATE
    U-1U-1
    U-2U-2
    U-4U-4
    ..................
    ..................
    U-20U-20
    U-25U-25

    Given that the tables have the same column names, I get the following error :

    402 error at line 103, column 4

    required aliases in the SELECT list of the slider to avoid duplicate column names.

    So how to export data to excel that has 2 tables with the same number of columns and the column names?

    Should I paste the code? Should I publish this query in 'SQL and PL/SQL ' Forum?

    Help me with this please.

    Thank you.

    Wait a second... is this a kind of House of partitioning? Shouldn't it is a union of two tables instead a join?

    see you soon

  • problem with update of the number of lines

    Hello..

    Im very new to obiee and now to learn things.

    I'm using the following link to learn how to create a repository and work with it.

    http://www.Oracle.com/technology/OBE/obe_bi/bi_ee_1013/bi_admin/biadmin.html

    and im facing problem by updating the number of lines.

    get a dialog like...

    There was an error while updating the number of lines for "SH"... "" SH ". "" CHANNELS ".
    nQSError:17001Oacle Eroorcode:942, the message: ORA - 00942:table or view does not exist the OIC OCIStmtExecute call: select count (*) channels.
    Failed executing the statement nQSError:17011SQL.

    Wat could be the problem? can anyone help?

    thnx in advance

    Which account you use the update? SH? Check if the account has certain rights that tabel/view.

    concerning

    John
    http://obiee101.blogspot.com

Maybe you are looking for

  • Unable to print the topics covered in the emails in Firefox, the paper is empty.

    The only element that prints is the AOL section and the date.

  • Connect with SN

    Hello community. You can help me please? My friend told me that she called him some support, they said that they are an Appleand say that gave them the serial numberand they was connected. Is it possible to connect with the serial number? Or my frien

  • NB100 - how to change the language of Win XP English

    Hello world! I just bought a NB100 from a friend, but the language is in Arabic. I could use it very well, but I prefer the system in English language. How can I do this without a CD-ROM drive?Your help would be greatly appreciated. Thank you. OS: Wi

  • driver and system restore problems.

    When I turn on my computer it say the perimeter is incorrect. the black screen appears and flashes at the top saying c: Windows system32i need help because I can not restore the system have already tried. more I want to know if the "lodge" and other

  • Need name of server

    to get a new email, I put in the name of the incoming and outgoing server. where can I find them?