Delete the last column in a table

Hey there,

is it possible that a script selects the last column of a table (there are tables with columns 3 and 4 on a page) and deletes it?

And is it possible that this is happening on a specific layer?

Greetings

Hi, ELP,.

Use the code below:

//remove column
var myTable = app.activeDocument.stories.everyItem().tables.everyItem().columns[-1].remove();

//remove column with layer
var myTable = app.activeDocument.stories.everyItem().tables.everyItem().getElements();
alert(myTable.length)

for(i=0; i

Concerning

Siraj

Tags: InDesign

Similar Questions

  • The line of the last line of each table page is going to be missing.

    Hi Experts,
    In OBIEE 11.1.1.6.0, I have a report contains more than one line. "When I click on" PDF "Print", the last line of each table page line will be missing. " Why?
    Are you facing the same case? How soluve this question? Thank you.

    Hey Kobe,

    The question, looks lke a bug. Here's the work around, change the table view, click the properties of content next to the text "Table" (at the top of the columns and measures) in the layout-> position In Border pane to choose custom and select only the bottom edge (horizontal line). Now export to pdf format, you must see the border for the last row on each page.

    Kind regards
    DpKa

  • IF NEW VARIABLE in SQL QUERY, DISPLAYS as the LAST COLUMN + rpad does not

    Hello all and thanks in advance.


    (1) if I add a new variable to my sql query to select a column, which was already on the table, it shows it in the report of the table as the last column on the right. In other words, if I add "the street" to

    something like city, postal code, street, store, Manager, etc., instead of placing the Street between CP and the Bank, the place like I said as the last column on the right.


    (2) when the values entered in the cells of the tables, Yes, they extend to their length, but, only if it is a Word. If it is two, as when I enter the value of 'very good '.

    then two lines as well as by a newline within the cell, for example, which in fact too high the rank. I tried sdap spaces with rpad but this did not work. something like rpad (stock, 20,' ')

    I have to say that the table is in the same page where there is a form, as the table grows in length it's actually squeezing the form on the left.


    (3) rpad did not work with the simpler syntax, but less would be with what I need, because it turns out that I am using DECODE to perform a conversion between the displayed value and

    value returned in my select list of values, something like: DECODE (TO_CHAR (stock), '1', 'Black', '2', 'Average', '3', 'good', '4', 'Very good', null) AS stock

    so, I tried to put the rpad there in several places, but either he gave the parse error or it has left empty do not pick up all the values in the column.


    Thank you very much

    Alvaro

    Alvaro

    (1) this is the standard behavior of the constructor of the apex. You can change the order of display with arrows in the report column attributes.

    (2) you have to play with the style of the column attributes to accomplice this. For the style of the instance = "" white-space: pre; ' in the attributes of the element column attributes. " White-space: normal would be put on several space (' ') 1. So no matter how you add with rpad, they will display as 1.
    Set a width or as attribute in a class style for this column.

    Nicolette

  • How to add the new column in existing table to our desired location?

    How to add the new column in existing table to our desired location?

    For example, I have to add the new column 'course' before the salary column in the emp table.

    I think the best way is to add the column at the end of the table and create a new view with the order of the columns...

    Another option...

    places the data into a temporary table and recreate the table with the correct order of the columns, and then insert data to the table from the temporary table

    Refer

    Add column (from table) in the desired position

    Example:

    CREATE TABLE temp_my_user LIKE)

    SELECT * FROM password);

    DROP TABLE password;

    (Password) CREATE TABLE

    userID NUMBER

    , first name VARCAHR2 (25)

    , middleInitial VARCHAR2 (1)

    (, name VARCHAR2 (25));

    INSERT INTO password (userID, firstName, lastName)

    (SELECT username

    first name

    lastName

    OF temp_my_user);

    DROP TABLE temp_user;

  • How to remove (delete) the last blank page of the script?

    Is anyone of you know how to remove (delete) the last white page that appears in the script? My story is 126 pages long, but in the scenario (the document) 127 pages appear because the last is a blank page, how to erase this page? Thank you.

    You can try the following:

    -by pressing the delete key at the end of the text to page 126

    -Check if you have the ability to 'Unlock the Pages' in the Menu 'Production '.

    If you still face this problem, can you please save the document to disk (file > save to disk) and send us an email to DL-AdobeStory-supportadobecom, so that we can offer you a fix?

  • You can delete the last page of a document with a script?

    Hello, I built a script week last to help me remove the formatting and some to reapply the formatting on a large number of files. I am still learning a lot about how to create scripts and what are the commmands but I almost doen with everything I put in it. One of the last things I want to add is to delete the last page of the Indesign file if it has content or not. Is this possible? Can someone point me in the right direction? Thank you

    Something like this:

    if (app.activeDocument.pages.length > 1)
         app.activeDocument.pages[-1].remove();
    

    First check to see if the document contains multiple pages and does, delete the last page.

    Hope that helps.

    --

    Marijan (tomaxxi)

    http://tomaxxi.com

  • How to restrict the new line in input field or delete the last tank in as3?

    Sorry, Noobie here!

    I have a text entry box. If you press ENTER, a new line starts; What makes the line previous invisible unless you press the BACKSPACE key.

    So, if I type '1' in the input box, then hit eneter the number '1' becomes invisible, except if I retaliate.

    Now, I still need the Enter key because I have an event listener that calls a function once it's in a hurry, but I still need that '1' is visible.

    So, I need to be:

    To be able to restrict the field of the creation of a new line (line authorized max = 1)

    or

    To delete the last character entered in the text of entry if you press the Enter key.

    These two should be the same result, but I don't know how to do both.

    If anyone can help, I would be very grateful!

    Turn off your textfield object multiline:

    your_tf. Multiline = false;

  • Delete the entire column (of an array) If you have specific words

    Can someone help me?

    I have a document of great size with plenty of tables.

    The tables have the same structure:

    a line with the title and under different columns, where the latter is a price list.

    The first word of this last column is the PRICE, and we need, is that all cells (with content) that are below this cell to be eliminated PRICES...

    I tried to do with this: https://forums.adobe.com/thread/1533114?q=delete%20rows

    but the first abolition of PRICE all the words, but with this script are the lines, not the deleted columns...

    Can someone help me?

    Thanks in advance!

    Try this,

    var doc = app.activeDocument,
    _cells = doc.stories.everyItem().tables.everyItem().cells.everyItem().getElements();   
    
    for ( var k = _cells.length-1; k>= 0; k-- ) {
        try{
             if ( _cells[k].contents == "PRICE" )  _cells[k].columns[0].remove();
        }catch(e){};
        }
    
  • Excel, download the last column

    Hello, I can't find the function "Excel is last row", which can be used to get the lines of a 2D array. My question is how should I get the columns for a 2D picture, because I can't find the function «Excel get last column» Please help me, thank you very much.

    You can easily create your own Excel get last Column.vi last Row.vi code amendment get Excel.

    Ben64

  • How to get rownum of the last line in a table?

    Hello

    I need to add a line slot-shaped table with the dynamic value.

    I add a line slot-shaped table with existing lines so I need to get a rownum of the last row of tabular presentation.

    I'm using a process like this:

    Declare

    l_value varchar2 (200);

    number of rownum_value;

    Begin

    l_value: = wwv_flow.g_x01;

    rownum_value : = wwv_flow.g_x02;

    HTP.p ("< class td =" child"> ');

    HTP.p (APEX_ITEM. DISPLAY_AND_SAVE (p_idx = > 3,

    p_value = > l_value,

    p_item_id = > 'f03_000 ' | ROWNUM_VALUE - here is Rownum value

    ));

    HTP.p ("< table > '");

    HTP.p ("< class td =" child"> ');

    HTP.p (to_date (sysdate));

    HTP.p ("< table > '");

    HTP.p ("< class td =" child"> ');

    HTP.p (APEX_ITEM. CHECKBOX2 (p_idx = > 5, p_value = > 'Y', p_item_id = > 'f05_000' |) ROWNUM_VALUE -here is Rownum value

                             ));

    HTP.p ("< table > '");

    And I use the dynamic action with Ajax to pass values to the process:

    (function () {}

    get var = new htmldb_Get (null, $v ('pFlowId'), 'APPLICATION_PROCESS is ADD_VALUE', $v ('pFlowStepId'));

    get.addParam ('x 01', $v ('P2_VALUE'));

    get.addParam ('x 02',SOME_ROWNUM_VALUE);  Here, I need to get the value of Rownum

    gReturn = get.get ();

    get = null;

    gReturn = (! gReturn)? ' null': gReturn;

    var table1 = document.getElementById ('tabform_TABLE');

    Table2 = table1.getElementsByClassName ("uReport") var [0];

    TBODY var = table2.tBodies [0];

    var row = document.createElement ("TR");

    row.innerHTML = gReturn;

    tbody.appendChild (row);

    })();

    How can I get a value of rownum in the last row of my tabular form?

    I prefer to use JavaScript, but any other solution would be much appreciated.

    I'm on Apex 4.2

    Thanks to you all.

    There are a few options

    Base Oracle: Number count of rows returned in the report of the APEX

    for example:

    $('#report_emp td[headers="ENAME"]').length

  • Delete the last character in the input field

    How to remove the last character of an input field?

    It deletes all

    When you click on:

    SYM.$("textfield"). Empty();

    Thank you!

    Try this:

    var inputTxt = sym.$("textfield").text ();

    var truncatedTxt = inputTxt.slice (0, -1);

    SYM.$("textfield"). Text (truncatedTxt);

    HTH,

    Vivekuma

  • Delete the last item on the page with some scriptlable

    Hi @ all,

    I'm trying to solve the following problem, I hope one of you can help me:

    Import xml files into a database in InDesign (CS 5.5, Windows 7) to get a full product catalog.

    Before each product group is inserted a subheadline (separate textframe with scriptlable 'katalog_untergruppe'), but in the case of a page break, it's the last item on a page.

    Can I somehow, select these elements and remove them with a script in the InDesign document?

    I tried to do on objects on each page of counting and remove the frame if there a number higher than 40, but the number of objects is different, so sometimes necessary frameworks are deleted and some are still there.

    So I need to check if it's the last item on the page. Any ideas?

    Here my test:

    function test() {}

    for (var i = 0; i < document.allPageItems.length; i ++) {}

    If (document.allPageItems [i] .label! = "") {}

    PAGESTART

    If (document.allPageItems [i] .label == 'katalog_untergruppe') {}

    var n = 1;

    While (document.allPageItems [i + n] .label == "") {}

    n ++ ;

    }

    if(n>40) {}

    document.allPageItems [i] .remove ();

    }

    }

    If (document.allPageItems [i] .label == 'katalog_untergruppe' & & document.allPageItems [i + 1] .label == 'pagestart') {}

    document.allPageItems [i] .remove ();

    }

    }

    }

    }

    test();

    Thanks in advance :-)

    * Rike *.

    @ Jump_Over

    This does not work either, sometimes now other executives of related texts are deleted.

    With the help of someone else in combination with yours, I have now found a working solution.

    Search for the item lowest, if it is marked "katalog_untergruppe", delete it.

    Thank you very much.

    @Hans

    Sorry for not posting a file, but I'm not allowed to.

    @all

    Here a script to work for the problem, it is perhaps useful.

    function test() {}

    for (var i = 0; i)< app.activedocument.pages.length;="" i++)="">

    currentPage var = app.activeDocument.pages [i];

    var lastpageItems;

    for (var j = 0; j)< currentpage.pageitems.length;="" j++)="">

    var currentpageItems = currentPage.pageItems [j];

    If (j == 0)

    lastpageItems = currentpageItems;

    ElseIf (currentpageItems.geometricBounds [0] > lastpageItems.geometricBounds [0])

    lastpageItems = currentpageItems;

    }

    If (lastpageItems.label is "katalog_untergruppe")

    lastpageItems.remove ();

    }

    }

    test();

  • Select all the values of column except the specific columns in all tables

    Hello

    I want to display all the column values for all tables in the database, with the exception of 3 columns that exist in all tables...

    Can someone give some advice?

    See you soon,.

    Jin

    How are you going to display all columns of all tables?

    Thank you
    Baskar.l

  • AddRow on enter on the last field in a table

    Hello

    4.2.6.00.03 on 11.2 db APEX


    I am trying to find a way to add a new line when pressing enter in the last field in tabular form. The user does not want to press the new button to add a line every time, but I want to just press on enter the last field, indicating that a new line should be added.

    Anywbody is an easy trick for this (probably the JS that is not my specialty )?


    Concerning

    Bottom


    Hi there,

    Try the following steps below

    Create a dynamic action:

    Event: Down key

    * Type selection: dom

    * DOM object: window

    Condition: Expression of Javascript

    window.event.keyCode is 13;

    Real action

    Action: Run Javascript code

    under settings-> code->::AddRow();

    Check out this old thread for more details: Add addRow tabular without button

    Kind regards

    Jitendra

  • Delete the pages 5.6.2 table but no content

    How can I delete a Table but keep the content to a single list, I currently have 3 columns in the table? I think used to be able to do in previous versions in Format but it's gone.

    Click on the Table to select > create a Textbox > paste into this

    This works because the Tables can not be placed in the text boxes in the 5 Pages, unlike in Pages ' 09, as well as the content is pasted.

    If you want a more productive workflow, use the Pages ' 09.

    Peter

Maybe you are looking for

  • Lost the disk for Satellite M115

    Does anyone know if Toshiba M115 came with a driver and OS disk when it was purchased?I need to restore my drivers and I can't find the disk and I don't remember having ever one. If I haven't lost it, does anyone know if Toshiba never sells additiona

  • DB tools create Table

    Hello.. I got this error when trying to create a database Conn Execute.vi-> DB tools create Table.vi--> CreateDatabase.viException occurred in the Microsoft Office Access database engine: syntax error in the statement CREATE TABLE in Conn Execute.vi-

  • How to remove Runtime Visual C++ (x 86) libraries?

    Hi all I am trying to install a new program on my computer, but get the following error message: Please solve the following: A newer version of Microsoft Visual C++ 2010 redistributable was detected on the computer. I found Visual C++ 2005 in Add/Rem

  • Adding physical disk

    The current server configuration:Dell PowerEdge 510 with 12 hard drive on Controller PERC H700 bays.  4 berries are already used for operating system and Application installation.  Configured with RAID 10 I need to install harddisk 8 additional in th

  • Maxx Audio does not work on Inspiron 5520 Win 7 64 bit (start-up Maxx Audio has no effect)

    Hello I am running Windows 7 Professional 64 bit on my Dell Inspiron 5520. I have installed audio drivers available for this product (http://www.dell.com/support/drivers/us/en/04/DriverDetails/Product/inspiron-15r-5520?driverId=X8MPY&osCode=W764&file