9 Replies Latest reply on May 6, 2010 9:26 AM by TonKuypers

    Possible script for conditionally merging cells in an InDesign table?

    wamboyil

      Hello scripting experts!

       

      Members of the forum helped me a while back with some scripting in InDesign CS4 (Mac), and I'm back again with another question. I'm working with large tables (only 2 columns, but over 6,000 rows on average). The columns are "part number" and "page". Right now, the table looks similar to the following:

       

      NSYADR60

      8/51

      NSYADR80

      8/51

      NSYAECPFLBP

      5/62

      8/71

      NSYAECPFLT25

      5/62

      8/71

      NSYAECPFLT35

      5/62

      8/71

      NSYAECPFLT7

      5/62

      8/71

      NSYAEDH120S3D

      4/29

      NSYAEDH180S3D

      4/29

      NSYAEDH20TB

      3/22

       

      Wherever a blank cell in the left column occurs, I need to merge it up into the cell above it containing the part number (and if there are several blank cells in succession in a column, they all need to be merged up to the next cell up with data in it). I also need to merge the same corresponding cells in the right column the same way (however, I need to keep all data here; there are no blank cells in this column). Here is an example of what I would need the sample above to look like:

       

      NSYADR60

      8/51

      NSYADR80

      8/51

      NSYAECPFLBP

      5/62

      8/71

      NSYAECPFLT25

      5/62

      8/71

      NSYAECPFLT35

      5/62

      8/71

      NSYAECPFLT7

      5/62

      8/71

      NSYAEDH120S3D

      4/29

      NSYAEDH180S3D

      4/29

      NSYAEDH20TB

      3/22

       

      Would anyone out there care to take a crack at a script for automating something like this? Any help would be greatly appreciated! Thanks!