Dealing with the merged cells in a table

Hello

I use tables often enough in InDesign, and I always ran into the same problem with the scripts - dealing with merged cells

The number of lines, I have a few cells which are merged horizontally

As I go through the cells in my selection, I want to test the line with the contents of the first cell in the same row - that is, the key to the line

In short, that's what I want to do:

1. Select the cells (manually)

2. run the script that checks each cell in the selection to test if it is in a line that begins with 'TOTAL' - and then, act accordingly

My problem is that the results are never is correct because some lines have merged cells

In turn, column 1 could have 50 lines, but column 2 can only have 48 rows (because it has 2 m)

That is why, when I check the contents of the first row as such:

cells[1].parentRow.cells[0].contents

He was not a match - even if it's in the same line.

What is the best way to get around this problem?

If anyone can give help on this topic, I would be very appreicate it

Thank you

Davey

Why do you need to know the index of line? Isn't parentRow get you the line concerned? I tried to recreate it but I don't see the problem. Maybe you can post some more of your code where exactly is the shift is not clear.

Tags: InDesign

Similar Questions

  • With the last update, I am unable to merge cells in a table and Ive tried Split and Live view.

    With the last update, I am unable to merge cells in a table and Ive tried Split and viewing live, all the tutorial and manuals say to do in Design view, which is no longer available.  How to merge cells in a table now?

    To get the fashion Design back in a checkerboard to fluid...

    Close all other files, open the fluid grid css and add the X below:

    /*

    Properties Grid Dreamweaver fluid

    ----------------------------------

    DW-num-CLO-mobile: X 4;

    DW-num-CLO-Tablet: 8;

    DW-num-OCOL-Office: 12;

    DW-gutter-percentage: 25;

    =====================================

    Then save and close the file.

    DW restart and you should have mode Design from here out on all files using this fluid grid .css file.

  • Unable to merge cells in a table

    Hello Forum,

    I use Indesign 5.5, problem to merge cells in a table in a script.

    I want to merge multiple cells in a table.

    I have three first fusion fusion coorectly, but my script not able to merge before merge.

    I use,

    var myDocument = app.activeDocument;

    var myTextFrame = myDocument.spreads.item (0).textFrames.item ("Spread0TxtFrame0");

    var table = myTextFrame.tables.firstItem ();

    var t = table.rows.length;

    var f = table.rows.length - (number of lines of t-start) / / * many lines of departure is intiger indicates the beginning of fusion line

    var fn = table.rows.length - (number of lines of t - end)

    table. Columns [1]. Cells [f]. Merge table.columns [2] .cells [fn];      * [1] = column starting, [2] = end of column

    When I the value for the first three merge it works but when I use for indxing fusion returns is the change in value of rows.what that I'm passing in f and fn.

    example: -.

    var t = table.rows.length;

    var f = table.rows.length - (t-0);

    var fn = table.rows.length - (t-5);

    table. Columns [0]. Cells [f]. Merge table.columns [0] .cells [fn];   It is the first merger

    var t = table.rows.length;

    var f = table.rows.length - (t-0);

    var fn = table.rows.length - (t-0);

    table. Columns [2]. Cells [f]. Merge table.columns [3] .cells [fn];   This is the second merger

    var t = table.rows.length;

    var f = table.rows.length - (t-1);

    var fn = table.rows.length - (t-1);

    table. Columns [1]. Cells [f]. Merge table.columns [2] .cells [fn];   That's the third merger

    var t = table.rows.length;

    var f = table.rows.length - (t-3);

    var fn = table.rows.length - (t-3);

    table. Columns [1]. Cells [f]. Merge table.columns [3] .cells [fn];   That's before merger

    I get

    an extra row merges with a following...

    separately the four works to merge but when I fire script with all it merge back bad cells merged.

    Please correct me where I'm wrong in the script.

    your answer will be beautiful.

    Thank you

    Ajay

    The number of lines is this table a in the first place? The most likely problem is that, because of previous mergers, the number of remaining rows is such that it is not enough lines left for f which will be formed properly.

    I may be off base here because I do not see that the screen Capture you tried to send.

    Dave

  • How to split the merged cells in the current document

    Hi experts

    How to script a separation all the merged cells in the current document?

    Thank you

    Respect of

    John

    something like:
    app.activeDocument.stories.everyItem ().tables.everyItem ().cells.everyItem () .unmerge () should work (not tested)

  • I forgot my password for apple and have permission to stage the 2 and broken my old phone and do not have the same number of what I can do my account is already waiting to be reset, but it takes apple long to to deal with the what else is there to do?

    I forgot my password for apple and have permission to stage the 2 and broken my old phone and do not have the same number of what I can do my account is already waiting to be reset, but it takes apple long to to deal with the what else is there to do?

    You know the e-mail password what do you use? I lost over $ 30 on my old Apple ID because I couldn't get into the email and apple would not transfer my money to my new account.

  • ITunes has stolen my music from my computer. Because they do not want to deal with the public, what should I do to get back them.

    Every so often, iTunes sends a notice to update the iTunes on my computer. Last year after that they did, all sounds have disappeared from my list of reading hundreds of old songs. Now, when I click on any song or melody, nothing happens.

    Given that Apple does not want to deal with the public, I ask, what do I do now, please?

    See the empty/corrupted after upgrade/crash iTunes library. Ideally, the measures taken immediately after that the problem appeared would restore your library. In some cases your media may be still on the computer, but not when iTunes is looking to it. The songs that do not play show with an exclamation point in the view of songs? ITunes plays all audio signal at all?

    TT2

  • Dealing with the size of the stage and the different orientations

    I am clearly dense, but I'm looking for examples of how others deal with the need to have apps that funciton in mode landscape or portrait.

    My first effort simply uses a scene from 600 x 600 with automatically guide the true value. It seems to work OK. The app draws, in the center of the screen of the Playbook (Simulator), regardless of the way the screen is oriented. Waste certain properties of the screen, but for my purposes, it doesn't really matter.

    To try to make it easier to deal with some questions I had try to implement new, I tried to make a step in 1024 x 600 with my stuff centered in space. Works very well in the landscape, but when in portrait mode, the app has been reduced to 1024 to the 600 dimension tree. I turned on Noscale for the scene, and now the app is drawn with the scene at the upper left corner then the app is cut on the right side of the screen. Is there a way to make the center of the scene?

    For my next one, I'll probably need to have two settings screen which are used based on direction - guidance on which is easier to deal with?

    I just wanted to mention that I removed the rotation and repositioning of the scene in the event onOrientationChange because I'm sure it was bad and can't remember why I had done this.

    Also, I recommend the mobile controls around on stage resize because when changing the orientation event is called, stage.stageWidth and stage.stageHeight properties have not yet been updated.

    The only uses for the orientation change event that come to mind anime the passage of an orientation towards another and the reorientation of handling maually when you autoOrients set to false.

  • Image processor "sorry, I could not deal with the following... * all."

    Hey! I so about 150 files opened in Photoshop. They are for a customer and the customer wanted individually to certain effects on each file. The files are RAW initially, first imported in Lightroom as .dng, then all my tonal changes made in Lightroom. I then opened images as smart objects in Photoshop, with a script of Lightroom. I then did the individual work on each image in Photoshop on the assumption that it would not trouble to save using the Image Processor script. When it came time to save, I tried save as .tif files using Image Processor. I selected the target in the form of open files files, set my destination folder, chose the TIF format and click on run in the top of the window. He shortly after said one very fast without source images, which disappears and then he says: "Sorry, I couldn't deal with the following" and then lists all of the 150 open pictures. It is a big problem because I'm on a lack of time.

    Any help or another idea for how to register all these images open in TIF or PSD even at this stage is extremely appreciated. I think there must be a fix or other road opposite to old fashion one save under...

    Thank you!

    !

    It doesn't look like the IPP will not new document either.

    He can. I added an option that can be set in the script to take care of this problem.

    //

    PROCESS_UNSAVED_IMAGES

    This will allow the treatment of unsaved images. To make this work,

    an unregistered image file is ~ / Desktop. If a file extension is

    not in the name of the image, .psd is used.

    //

    ImageProcessorOptions.PROCESS_UNSAVED_IMAGES = true;

    By default, it is false to get the 'traditional' behavior Set to true will leave PPI to process new images, not registered.

  • How to pass a pci device to vm? is this possible with the merger?

    I'd like spend peripheral scary pci directly to a virtual machine. is this possible with the merger?

    as long as im asking a pony on a mac with intel and nvidia graphics, is possible to map nvidia to a virtual machine and let the host with intel one? If Yes, is it possible for a virtual machine running os x?

    Hello

    No, you can't.

    The only VMware product that can pass through the PCIe card is vSphere.

    vSphere work on some apple hardware, but it is a bare metal hypervisor, you cannot use OS X on the machine itself locally then (only remote via another computer that connects to the server for vSphere)

    --
    Wil

  • help with some merged cells in table

    I'm just learning how to use Dreamweaver 8 and tables. I am trying to use a table with merged cells, filled with graphics - one graph per cell. I make my jpg size of my cell, which seems to fill. Then, when I download to view in the browser, it seems that the graph does not entire cell. At one point, he worked in Dreamweaver and the browser. Now, in the browser view, it seems that there is more space above the image and below. Any suggestions on what is happening?

    Thank you! It is now clear that I should not use tables with the graphics.

  • What is the best way to deal with a 'Implicit coercion' in a table to a sprite?

    Hi all!

    With the continued support of this forum, I'm getting closer to have a programme of work. I can't wait to be able to help others like me once I've finished learning the ropes of AS3.

    I'll briefly explain what I want to achieve and then followed with my question.

    Background

    I created a random number of 12 x 9 grid that fills each cell with an image, based on the numeric value of each cell. I also have a random play button that makes random numbers in the grid. The problem I am running became my click event of button to erase the current images off the grid in order to allocate the new (for example by removing the objects display battery in order to place the new ones in the same places).

    Question

    My question is this: what is the best way to manage an implicit constraint from a table to a sprite? I pasted my complete code below so that you can see how the functions are supposed to work together. My sentence is apparently not being able to use a value from array with a sprite (sprite represents the real layout of the grid on the pile of display while the table starts as a number that is assigned an image that must be transmitted to the sprite).

    ============================================================================

    package
    {
    import flash.display.MovieClip;
    import flash.display.DisplayObject;
    import flash.events.MouseEvent;
    import flash.display.Sprite;
    import flash.text.TextField;
    import flash.text.TextFormat;
    import flash.utils.getDefinitionByName;

    SerializableAttribute public class extends MovieClip Blanko
    {
    Contains 12 * 9 grid of cells.
    var grid: Sprite;
    Maintains the shuffle button.
    var shuffleButton:Sprite;
    Is equal to 12 columns, 9 lines.
    var cols: int = 12;
    lines of the var: int = 9;
    Equal number of grid cells (108).
    cells var: int = COL * rows;
    Sets of cell width and height to 40 pixels.
    var cellW:int = 40;
    var cellH:int = 40;
    Contains 108 images of cell.
    var imageArray:Array = [];
    Contains 108 numerical values for the cells in the grid.
    var cellNumbers:Array = [];

    Constructor calls the functions "generateGrid" and "makeShuffleButton".
    public void Blanko()
    {
    generateGrid();
    makeShuffleButton();
    }

    Creates and displays the grid 12 * 9.
    private function generateGrid (): void
    {
    grid = new Sprite;
    var i: int = 0;


    for (i = 0; i < cells; i ++)
    {
    cellNumbers.push (i % 9 + 1);
    }
    trace ("before shuffle:", cellNumbers);
    shuffleCells (cellNumbers);
    trace ("after shuffle:", cellNumbers);
    var _cell:Sprite;

    for (i = 0; i < cells; i ++)
    {

    / / This line is where the implicit constraint occurs. '_cell' is a leprechaun trying

    on a temporary basis equal to a value from array.
    _cell = drawCells (cellNumbers [i]);
    _cell.x = (I % cols) * cellW;
    _cell.y = (I / COL) * cellH;

    grid.addChild (_cell);
    }
    }

    Creates a "shuffle" button and adds a mouse click event.
    private function makeShuffleButton (): void
    {
    var _label:TextField = new TextField();
    _label. AutoSize = 'center ';
    TextField (_label) .multiline = TextField (_label) .wordWrap = false;
    TextField (_label) .defaultTextFormat is new TextFormat ("Arial", 11, 0xFFFFFF, "bold");.
    _label. Text = "SHUFFLE";
    _label.x = 4;
    _label.y = 2;
    shuffleButton = new Sprite();
    shuffleButton.graphics.beginFill (0 x 484848);
    shuffleButton.graphics.drawRoundRect (0, 0, _label.width + _label.x * 2, _label.height +)
    _label.y * 2, 10);
    shuffleButton.addChild (_label);
    shuffleButton.buttonMode = shuffleButton.useHandCursor = true;
    shuffleButton.mouseChildren = false;
    shuffleButton.x = grid.x + 30 + grid.width - shuffleButton.width;
    shuffleButton.y = grid.y + grid.height + 10;
    this.addChild (shuffleButton);
    shuffleButton.addEventListener (MouseEvent.CLICK, onShuffleButtonClick);
    }

    Erase the images of the cell, mix of their numbers and then assigned these new images.
    private function onShuffleButtonClick (): void
    {
    eraseCells();
    shuffleCells (cellNumbers);
    trace ("after shuffle:", cellNumbers);


    for (var i: int = 0; i < cells; i ++)
    {
    drawCells (cellNumbers [i]);
    }
    }

    Deletes any existing cells in the battery of the display image.
    private void eraseCells(): void
    {
    While (imageArray.numChildren > 0)
    {
    imageArray.removeChildAt (0);
    }
    }

    Changes cell phones numbers (makes random table).
    private void shuffleCells(_array:Array):void
    {
    var _number:int = 0;
    var _a:int = 0;
    var _b:int = 0;
    var _rand:int = 0;

    for (var i: int = _array.length - 1; i > 0; i-)
    {
    _rand = Math.Random () * (i - 1);
    _A = _array [i];
    _B = _array [_rand];
    _ARRAY [i] = _b;
    [_Rand] _ARRAY = _a;
    }
    }

    Retrieves and sets a custom image to a cell based on its numerical value.
    private void drawCells(_numeral:int):Array
    {
    var _classRef: Class = Class (getDefinitionByName ("skin" + _numeral));
    _classRef.x = 30;
    imageArray.push (_classRef);
    imageArray.addChild (_classRef);
    return of demonstration;
    }
    }
    }

    ===========================================================================

    Any help with this is greatly appreciated. Thank you!

    If you want to have an array of Sprites that you later clear that is fine. But this does not mean that your function should return to it.

    You need your function to return the sprite so that you can add it to the display list and everything what you need.

    So just have the function get Sprite, push it in the "toBeClearedInTheFutureArray" and then return a reference to the currently acquired sprite.

  • Need help with the merger of the lines of a virtual Table based on a foreign key

    The following is the result of the sample of a large SQL SELECT statement exits from a single table. I used - to show the values of X in each column

    CODE - XX - YY - ZZ_
    AD------------X-----------------------------------
    AD-----------------------------------------------X
    AD---------------------------X--------------------
    CD------------X-----------------------------------
    CD-----------------------------------------------X
    CD---------------------------X--------------------

    I would like to further clarify the results above by the merger on a single line for each CODE. Example below.

    Please note that each line for each code, has only a single value. Thus, by using a CONCAT function would be fine for me. I am at a loss to identify the parent SQL statement to merge data as below

    CODE - XX - YY - ZZ_
    AD - X - X - X
    CD - X - X - X

    Seek help from people on this forum

    Published by: cseshan on October 18, 2010 21:04

    Published by: cseshan on October 18, 2010 21:05

    Published by: cseshan on October 18, 2010 21:08

    Published by: cseshan on October 18, 2010 21:09

    Published by: cseshan on October 18, 2010 21:09

    Published by: cseshan on October 18, 2010 21:11

    also - if you put the [code] [/ code]
    Tags around your code (without spaces) you can format it slightly better

    By asking questions on the forum it is also good to add table creation/insert script or use a statement and other you should reproduce your data
    for example:

    SQL> with t as (select 'AD' code, 'X' xx, null yy, null zz from dual
      2              union all
      3             select 'AD',NULL,'X',NULL FROM DUAL
      4             UNION ALL
      5             SELECT 'AD',NULL,NULL,'X' FROM DUAL
      6             union all
      7             select 'CD' , 'X' , null , null  from dual
      8             union all
      9             select 'CD',NULL,'X',NULL FROM DUAL
     10             UNION ALL
     11             SELECT 'CD',NULL,NULL,'X' FROM DUAL)
     12  SELECT code, max(xx), max(yy),max(zz)
     13    from t
     14    group by code           ;
    
    CODE                             MAX(XX)                          MAX(YY)                          MAX(ZZ)
    -------------------------------- -------------------------------- -------------------------------- -
    AD                               X                                X                                X
    CD                               X                                X                                X
    
    2 rows selected.  
    
  • How to deal with the table still growing?

    All tables are more and more applications. In some applications, tables become quickly more and more wide. How to deal with this problem?
    Currently I develop an application system. Should I add a large number of orders to remove the code for each table?

    The problem is delete is very time consuming.

  • Merge cells in a table

    Hello

    How to merge cells in a vertical table (cells of different rows in the same column) in the designer.

    Thank you

    You can merge cells in a row, but I don't think you can merge the cells in a column. Maybe an alternative is to use another table. For example, column D is a table with a header line and a body line.

    Steve

  • [CS4] [JS] Merge cells in a table?

    Hello world!

    I make small script to apply a group of commands in the text. I select text, transformation to Table paragraph style applies styles (table and cell styles) and unfortunatelly each line in a separate cell. I need to do everything in a single cell only.

    How can I do this? Help, please.

    This is the script:

    myText = app.selection [0] .appliedParagraphStyle = "Norma DO."
    myText = app.selection [0];
    myTable = myText.convertToTable ("\t", "\r"),
    myTable.appliedTableStyle = "DOU".
    myTable.cells.itemByRange(0,-1).appliedCellStyle = "Cell DOU";
    myTable.cells.itemByRange(0,-1).clearCellStyleOverrides;
    myTable.cells.Merge;

    This last line does not work, gives an error.

    Thank you.

    Wagner

    myTable.cells.Merge is not a valid Javascript command - for various reasons.

    First of all, the Merge command is not a valid function on cells. You probably meant "merge".

    Then, the merger does not work on 'cells' - an array of cells. Instead, it runs on either a single cell (and you have to tell with what other cells to merge), or a collection of cells.

    Finally, since it is a function, it needs a pair of parentheses.

    If this does work:

    myTable.cells.itemByRange(0,-1).merge ();

    Specify a collection to merge, or, Alternatively,.

    myTable.cells.firstItem () .merge (myTable.cells.lastItem ());

    saying to merge all of the first cell to the last cell.

Maybe you are looking for

  • Pavilion P6000: Dead PC?

    Hi, I need help on my desk. My PC has 6-7 years now, and I have not activate it for almost 2 months now. I just reactivate it recently and it worked fine for a few minutes, so I went alone and when I came back, it is 'dead' and there not may start mo

  • Satellite C660D-13 q - need drivers for Windows XP

    Hello A Toshiba Satellite C660D-13 q (PSC1YE). In the BIOS I changed the controller SATA from AHCI to Compatibility Mode to allow the installation of Windows XP. In AHCI mode during the installation, I am getting blue screen all the time.(Besides - i

  • Update to firmware version 4.1.110.33149 for lenovo iomega ix2

    Hello I would like to update the firmware for the iomega ix2 lenovo to version 4.1.110.33149. Approximately how long it will take and will be my network settings be brought back? Thank you James

  • shortcut ALT for German umlaut, alt - o doesn't do not "o" "o".

    Is it possible to define the shortcut alt - u, so it only produces the Scandinavian German umlauts instead of special characters? ALT - o is an "o" not "o" on my keyboard. ALT - a is only an 'a' not 'a' on my keyboard. ALT - u works very well to make

  • How to: Use Smart install wireless install your Laserjet on Windows 7

    Some HP Laserjet printers have Smart Install. This allows you quickly connect the printer USB cable and start the installation. In this way a CD or a CD player is not necessary to install your device. Once the installation program appears you can pro