Applescript InDesign to Merge and Format Table Cells

The subject line says it all:
I have a document with a table that covers about 100 pages. The table has five or six columns, 25 to 35 rows. I want to be put my curser in a cell on a row, merge the cells in the row, then apply a paragraph format and a cell format.
And I have no idea how to do that.
Is anyone willing to give me a hand?
Thanks!
Jon.

@Jon – See the following blog post:
Marc Autret
Improve the Way you Merge Cells in InDesign
http://www.indiscripts.com/post/2012/04/improve-the-way-you-merge-cells-in-indesign
Uwe

Similar Messages

  • How can I copy and paste table cells from Pages into InDesign with minimum reformating?

    How can I copy and paste table cells from Pages into InDesign with minimum reformating?

    Do you mean you want to retain the formatting from Pages, or retain formatting already applied in ID?

  • Read Only and HTML Table Cell Attributes

    Hi Guys,
    I believe i have come accross a bug - i'm been working on a form that can be filled out and printed - when going into print for sake of the output looking nice i set the form element to read-only.
    As soon as an element such as a drop down box, text feild, text area, etc which display as "[selected value]" in plain text in read only mode, are changed to the read only mode apex seem to ignore the html table cell attributes.
    For example i have a id number in the top left and then a version number in the top right. Both use a text feild; the top left uses 'width="100%"' for it's HTML Table Cell Attribute to push the right cell to the right. and the right cell has 'align="right"'. Now this works fine when read only is off... but as soon as read only is on, both the width and the alignment are totally ignored, and i can't find any sign of them in the code.
    Because this is for printing; using the "disable" on the form element instead of "read only" function, isn't appropriate as disabled will make the elements faded and hard to read when printed, and keeping the elements as is will allow the user to edit information on the print screen - which is not appropriate.
    Is this a bug? Will it be fixed soon? Is there any work around?
    Cheers,
    Alex

    Use the "Read Only Element Table Cell(s) Attributes" in the Read Only region of the Item edit form.
    Scott

  • Get-Mailbox -Database and Format-Table questions

    Hi,
    I've written a script that will get the number of mailboxes on each database on our exchange server and then create a report and email it to everyone. This is the first script that I've ever wrote so I'm fumbling around and don't really know what I'm doing.
    I want to learn though so any advice is welcome. It is working but it still doesn't look as nice as I'd like for it to and I was hoping someone could look at my code and tell me what I could do to make it better. Here is part of it and then below shows the
    output text file as it is formatted. I'd like for it to be all one one table instead of each being a separate one but I don't know how to do that. I was reading that you can use $obj but when I was reading it I was completely lost about what was going on.
    Thanks.  
    Get-Mailbox -Database DB0 | Group-Object -Property:Database | select name,count | Format-Table -Autosize > M:\Scripts\DBcountreport.txt
    Get-Mailbox -Database DB1 | Group-Object -Property:Database | select name,count | Format-Table -Autosize -HideTableHeaders >> M:\Scripts\DBcountreport.txt
    Get-Mailbox -Database DB2 | Group-Object -Property:Database | select name,count | Format-Table -Autosize -HideTableHeaders >> M:\Scripts\DBcountreport.txt
    ./DBcountreport.txt
    Name Count
    DB0    167
                       ---  I want these spaces removed basically           
    DB1    167
    DB2    174
    DB3    169

    Hi Belthasar,
    try this:
    $temp = @(Get-Mailbox -Database DB0 | Group-Object -Property:Database | select name,count)
    $temp += @(Get-Mailbox -Database DB1 | Group-Object -Property:Database | select name,count)
    $temp += @(Get-Mailbox -Database DB2 | Group-Object -Property:Database | select name,count)
    $temp += @(Get-Mailbox -Database DB3 | Group-Object -Property:Database | select name,count)
    $temp | Format-Table -Autosize > "M:\Scripts\DBcountreport.txt"
    What this does is not write 4 tables to a text file, but combines the four tables and then writes the resultant one to the text file.
    Cheers,
    Fred
    There's no place like 127.0.0.1

  • Formatting table cells

    I would like to how to know how to set eg. the background of a cell in table or to set the cell non-editting. I tried to solve this problem like this:
    for (int i = 0;
    i < zinsstrukturVec.size();
    i++)
    ((JTextField)((DefaultCellEditor) jTableZinsstruktur.getCellEditor(i,4)).getComponent()).
    setHorizontalAlignment(SwingConstants.RIGHT);
    but it do not work.
    thank you!
    Tri D.

    Look at the tutorials for Table Cell Renderers

  • Indesign data merge and a very arge csv file

    Hello all,
    I have a bit of an issue with data merge. I have about 35 product sell sheets, all with the same categories. I am trying to do this via data merge in indesign (ind cs6). Now the csv file that I am using is very large. It has about 75 columns in it. Some of the columns have a lot of text like the ingredients for each product which can be up to 200 words or more. My problme is that when I create a merged documnet I am only getting the first 6 columns to populate the document.
    I have tried everything: taking out all myspaces in the header rows, eliminating all the empty columns etc. Funny thing is when I delete the first 6 columns and try again, the next 6 will populate just fine.
    Is there some sort of column imit in the csv file?
    I cannot figure this out for the life of me and have read every forum I can get my hands onbut they all seem to talk about business cards, envelopes or building a simple catalog template, nothing that includes this much information to be  merged.
    Any help at all would be greatly appreciated, thank you.
    Mike

    SAUTEED VEGETABLE PUREE MIX (CARROTS, ONIONS, CELERY), SALT, SUGAR, MALTODEXTRIN, CORN OIL, LESS THAN 2% OF AUTOLYZED YEAST EXTRACT, WATER, POTATO STARCH, XANTHAN GUM, NATURAL FLAVORS, CARROT JUICE  CONCENTRATE.
    the text above is what comes through in the ingredients in one of my data rows. It's the last thing that works out of the 6 columns that are getting carried over properly.
    so you're saying to replace all the long text with breaks with something like "ingtxt" then do a find and replace? I'll try that.

  • How to merge and centre cell on Numbers 3.2?

    Hello, I need to merge and centre two cells on Numbers 3.2 and haven't found any way to do it yet?

    I used to love merging cells to ge things looking just the way I thought they should. SG and others on this forum have convinced me to avoid it. It does not take much tweaking to get the results I used to get with merged cells.
    I entered the text in C1. There are no merged cells. The alignment is right justified. To get it centered on B and C I typed option-tab twice after "Cells". It is a little difficult because you can't see option-tab while you are entering it. Once you leave the cell its affects are manifest.
    quinn

  • Fill table cells with color % depending on cell content

    Hi.
    I'm working on a document with a lot of tables filled with percentages. The tables are originally on a Word document and the table cells are tinted according to their content: a value of 20% on the cell corresponds to a tint of 20%. This is done automatically on the Word document through a conditional formatting option that applies a graded color scale. Is there any way to do this in InDesign? I tried placing the tables and tried all options, but the color is not imported. Perhaps a script or a GREP style?
    Thank you.

    Conditional formatting in Word is done via formula, but in Excel it is handled more "on the surface" and Excel's conditional formatting carries into InDesign nicely via Place or Paste. It could be worth considering moving those tables into Excel.
    InDesign doesn't do this kind of formatting as a native function, but it couldn't hurt to ask about possible scripted solutions in the Scripting Forum.

  • Background Image In Table Cell

    I'm not sure what I'm doing wrong or missing here. This is the first time that I'm using an image as a background. I've made a table with a 100% width with 3 colums and 3 rows. The left and right table cells have been merged and the 3 middle rows are at a width of 938 pixels. I have cropped the images correctly. The right column lines up perfectly, but the left column does not line up like it's supposed to with the image. You can take a look at it by going to http://www.wattsconcepts.com/new
    Here is the code below if anyone wants to take a look at it. Any help in solving this is greatly appreciated. I am using Dreamweaver CS5.5
    Thank you for your time!
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Watts Concepts - Kentucky Web Design - Harrodsburg, Kentucky</title>
    <style type="text/css">
    body {
              margin-left: 0px;
              margin-top: 0px;
              margin-right: 0px;
              margin-bottom: 0px;
              background-color: #000;
              background-image: url();
    </style>
    </head>
    <body>
    <table width="100%" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td rowspan="3" align="left" valign="top" background="images/left-index.jpg"> </td>
        <td width="938" align="center" valign="top"><img src="images/logo-index.jpg" width="938" height="172" /></td>
        <td rowspan="3" align="left" valign="top" background="images/right-index.jpg"> </td>
      </tr>
      <tr>
        <td align="center" valign="top"><img src="images/eye-index.jpg" width="938" height="296" alt="Reach Your Audience Today" /></td>
      </tr>
      <tr>
        <td align="center" valign="top"><img src="images/test-index.jpg" width="938" height="197" /></td>
      </tr>
    </table>
    </body>
    </html>

    Your HTML code should ideally be as follows:
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Watts Concepts - Kentucky Web Design - Harrodsburg, Kentucky</title>
    <style type="text/css">
    body {
    margin-left: 0px;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
    background-color: #000;
    </style>
    </head>
    <body>
    <table width="938px" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td width="938" align="center" valign="top"><img src="images/logo-index.jpg" width="938" height="172" /></td>
      </tr>
      <tr>
        <td align="center" valign="top"><img src="images/eye-index.jpg" width="938" height="296" alt="Reach Your Audience Today" /></td>
      </tr>
      <tr>
        <td align="center" valign="top"><img src="images/test-index.jpg" width="938" height="197" /></td>
      </tr>
    </table>
    </body>
    </html>
    Also, you don't need 3 columns for this website. 1 column and 3 rows should do. Also, never use 100% for <table> width. It's bad practice as you're making your site fluid which will render your site to malfunction on some browsers
    And you had the entire 3 sections as 1 image as your CSS body background-image. This is bad practice. Crop only what you want for each section, never give the entire merged site as 1 image.
    Try the code I've given you above and it should work perfect.
    A quick tip: Try learning and using DIV with pure CSS styling instead of tables. Tables are a thing of the past. You could just google it and you have tons of free resources on how to create a site using DIV. Also, there's a beautiful tutorial posted by one of our senior members here: http://www.adobe.com/devnet/dreamweaver/articles/dw_html5_pt2.html that explains how to create HTML5 site with Pure CSS styling using DIV tags.
    Cheers,
    ST

  • Tutorial for hyperlinking table cell

    Anyone know where i might find a tutorial. Google bringing up
    nothing
    I want to be able to hyperlink table cells and change table
    cell background
    color on mouse over etc.
    I am really struggling with this therefore need a tutorial
    TIA

    Why do you need to hyperlink the *cell*?
    If you put a normal hyperlink in the cell, and use CSS to
    make that <a> tag
    display:block, then it will fill the cell, and make the whole
    thing
    clickable. Further it allows you to use the pseudo-class of
    a:hover to
    change the background color....
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Andrew" <[email protected]> wrote in message
    news:e7bgvq$eog$[email protected]..
    > Anyone know where i might find a tutorial. Google
    bringing up nothing
    >
    > I want to be able to hyperlink table cells and change
    table cell
    > background color on mouse over etc.
    >
    > I am really struggling with this therefore need a
    tutorial
    >
    > TIA
    >

  • Can't vertically center text within a table cell with a picture next to it

    I have a table and each cell has a picture in it (which was "cut" from another part of the document and "pasted" into the cells). Next to it, I typed a few words. I want the words to be centered vertically within the cell. However, everytime I click on the vertical centering in the inspector, it moves the picture and the text remains at the very bottom of the cell. The text is "tied" to the picture. I've tried everything... highlighting the text, same thing. Can't figure it out!! Is there any way to do this without inserting text boxes??

    Vertical align works on text within text boxes and within table cells.
    I have just checked this using a table with:
    *1st cell* Inline Picture with caption under. Cell sizes to fit
    *2nd cell* Same as first, picture scaled down. Text and image centre vertically.
    *3rd cell* Caption only, vertically centred.
    It works and I have wrap turn off on the image, before I pasted it in.
    On rereading the O.P.'s post it seems to be saying contradictory things. That the text is "tied to the picture" which is what you would expect of inline graphics and that the text is stuck in the bottom the cell.
    Without a picture and a better description of the problem we are none the wiser.
    I am just guessing but perhaps the O.P. has the image and Inline graphic on the same line and can't understand why the bottom of the text and the bottom of the image are aligned.
    If this is the case it is a misunderstanding of what inline graphic means. The image acts just like a character in the text and sits on the text baseline, it is not an independent object.
    It is possible to shift text next to the image or the image itself by selecting either and altering:
    +Inspector > Text > More > Baseline Shift+
    But frankly you would be better separating the 2 and putting the text in the cell to the left or right of the image.
    Peter

  • JTABLE  Number Editor - Table Cell Renderer Clash

    Hello gentlemen,
    I have a JTABLE with an editable column 1. I implement a number editor and a table cell renderer (pls see below) to this column. I apply the setClickCountStart(2) method to the number editor in order to render each cell in the column editable only after two clicks. However, I believe setClickCountStart(2) is somehow overridden by a "default" functionality in my
    CustomTableCellRenderer.
    My problem is that any cell I select (click only once) in column1 is automatically editable whereas I only want a cell to be editable after two clicks.
    Please see my code below. Any comment is more than welcome!
    Cheers.
    hoodNumberEditor = new NumberEditor();
            hoodNumberEditor.setClickCountToStart(2);
            class CustomTableCellRenderer extends DefaultTableCellRenderer {
                public Component getTableCellRendererComponent(JTable table,
                        Object obj, boolean isSelected, boolean hasFocus, int row, int column) {
                    Component cell = super.getTableCellRendererComponent(
                            table, obj, isSelected, hasFocus, row, column);
                    if (isSelected) {
                        cell.setBackground(Color.white);
                        cell.setForeground(Color.black);
                    return cell;
           CustomTableCellRenderer customrenderer = new CustomTableCellRenderer();
            table.getColumn(1).setCellRenderer(customrenderer);
            table.getColumn(1).setCellEditor(hoodNumberEditor);

    1) Your custom cell renderer does nothing extra, so you can depend on default renderer.
    2) Instead of extending JLabel and implementing TableCellReneder, you should extend DefaultTableCellRenderer and override its get renderer method because DefaultTableCellRenderer itself extends JLabel and aditionally it does some optimizations etc., which you can miss if you implement your own renderer.
    3) If you set foreground and background color in last else statement also, then you can see the values correctly in windows L&F as well.
    Thanks!

  • InDesign crashes in time of table editing (cell's merge)

    InDesign crashes in time of table editing (cell's merge). Not always, but 1 out of 3 times.

    What version of ID? Is it fully patched? What operating system.

  • Merging and un-merging Tables (not talking about cells in a table).

    Hello,
    New to Mac-world and iWork 09. If I've two separate tables on a sheet and wanted to merge these two tables, also, if I've a table and would want to separate it into two or three etc. tables, can anyone help me doing this step by step, please?
    Thanks in-advance.

    D,
    Here's a step-by-step.
    *Merging 2 tables.*
    Here we shall assume for simplicity that there are no Footer Rows to deal with, at least not in the table that is going away.
    First, make room in your receiving table, the one that you are going to end up with. (This isn't mandatory, but it helps with the visualization of what you will have when you are done.) To expand a table, click once inside it to activate it and then you will see three large dimpled gray handles; one in the lower right hand corner can be dragged to add both columns and rows at once, one at the lower left corner can be dragged to add rows and one in the upper right corner to add columns.
    Now you have room to add your second table to your first.
    Moving your second table's content into the first table is a four-step process.
    1. Select all the cells in the second table that you wish to move.
    2. Edit > Mark for Move
    3. Select the cell in the first table where you want the upper left cell of the second table to go.
    4. Edit > Move
    Now you can clean up by deleting whatever is left of the second table that you didn't need to move.
    *Separating one table into two or more tables.*
    Lots of ways to do this, but here's my favorite.
    1. In the Sheets Pane, click on the name of the table that you wish to split.
    2. Edit > Copy , Edit > Paste , Select all cells in the new table, Delete them to clear the table.
    Now you have a new table the same size as your original. Make as many copies of this new blank table as you are going to need. This would be a good time to rename the new tables in the Sheets Pane. Again, it's not mandatory that the new tables be the same size as the original, but that's a convenient place to begin.
    3. Select a block of cells in the original table that you wish to split off.
    4. Edit > Mark for Move
    5. Select cell A1 in a blank table.
    6. Edit > Move.
    Repeat steps 3 to 6 as many times as needed.
    Now you need to clean up the blank rows and columns, both in your decimated original table and in your oversized new tables. The easiest way if you don't have any rogue cell content is to activate a table, grab the big handle in the lower right corner and drag up and left until you can't go any further.
    If you have any rogue cells, cells with perhaps accidental content away from your intended work, your table sizing handle will stop working when it runs against them. Any cell with content will block the table size reduction effort and if you want to shrink the table further you will have to either deal with the cells first or delete the rows and columns using other controls.
    Regards,
    Jerry

  • Help needed with referencing single Excel cells and formatting resulting text

    In InDesign CS5 I am putting together a 20pp catalogue of about 200 products. The plan is to have the product information, SKU code, quantity etc fixed, but have the prices (there are two i.e. pack price and individual price) being linked to an Excel spreadsheet. This is so that the prices can be updated in the Excel file and the InDesign file will pull the new prices through. In case you are wondering why I don't pull the whole set of information through, this is because there are a lot of copywriting changes done to the information once it's in InDesign - it's only going to be the prices that will be updated.
    I am planning on having two single cell tables in their own text frame, duly formatted with cell style, table style and paragraph style for the two price variables. This I am then going to have to repeat 200 times making sure I link to the next row down in Excel. This is going to be a hideous task but I see know way of modifying the cell in InDesign to point it to the next row in Excel. That's my first problem.
    My second problem is this. In the Excel sheet, the prices are formatted as UK currency and are therefore like this...
    £2.00
    £0.40
    £1.43
    £9.99
    £0.99
    £0.09
    What I will require is once I import that data (and refresh the data via a newly saved Excel file) is that the prices end up like this...
    £2.00
    40p
    £1.43
    £9.99
    99p
    9p
    So if the value is lower than £1.00 it needs a trailing 'p' added  and the leading zero and '£' sign stripped off. If the value is lower than £0.10 it also needs the zero after the decimal point stripping off.
    Then formatting wise, the '£' sign needs to be superscripted and the same for the 'p'. This I am assuming could be done via GREP?
    In summary, can anyone help with the first task of referecing the Excel cells on a cell by cell basis, given that it is the same cell column each time, but the next row down, and also point me in the right direction of the price formattting issues.
    Any help will be gratefully received.

    I would do this:
    Create on line with the formatting.
    Export as InDesign tagged text (TXT)
    Read out these tags
    In Excel exists a function to connect text from several cells and predfined text, there connect the content from cells with the paragraph styling tags. Do it in a seperate sheet. (Better would be to use a database like Access, there you can link your Excel sheet).
    Export this sheet as txt file
    Place this sheet as tagged text (there is an option in one of the sialog boxes).
    In preferences  < file handling you can specify that Tablecalculation Sheets and text is not embedded but linked, turn it on.

Maybe you are looking for

  • Error when refresh a workbook

    Hy Experts I need your very import help!!! We have excel files with queries, and workbooks too. When I refresh them, the system canceled with the message: "System Error program  CL_RSR_GRID and FORM FILL_STRUCTURE_MEMBERS-1-" I see the SapNote 101545

  • Add a new 4tb hdd to msi p45 platinum ?

    I'm planning to add a new 4TB western digital, caviar green  HDD's for my msi p45 platinum motherboard ist work will or use 3 tb . thank you

  • Editing error records in PSA

    Hi All, While loading data from R/3 datasource to PSA in BI side, the data load got failed due to invalid character present in the data. When i tried to edit that error record in PSA i found that the entire datapackage containing the error record is

  • Can clicking on a component in a pdf mark the number in a corresponding bill of material ?

    Hi, I have a production drawing with graphics and a bill of material. Is there a way with a product like Adobe Writer when clicking on the grahics that a corresponding number in the bill of material is selected ? We need this functionality for a spar

  • Switch default monitor

    i have a user that has a brand new powerbook and a 23" display. she uses the 23" as her main display but wants to be able to very easily reverse this for powerpoint presentations, that way the menu bar is then on her powerbook display and the powerbo