InDesign Table - Collapse empty Row

My apologies if this is not posted in the proper category...
Ok, here's my issue...
I have a table with 5 rows.  Sometimes, not all of the rows in the table will contain data.  Is it possible for InDesign to automatically collapse a row if there is no data present in the cells in that row?
Thanks!

Jongware has probably answered this already, but if not:
To run a script in InDesign, copy the code and paste it into
an ordinary text editor (such as Notepad in Windows), then
save the file with the extension .jsx in the Scripts Panel Folder
(typical path: Start > MyComputer > Local Disk(C:) >
Program Files > Adobe > Adobe InDesign CS3 > Scripts >
Scripts Panel).
It will then be available from within InDesign (Window > Automation > Scripts).
Yesterday's script removes empty rows from all tables in a document.
You might find the script below a bit more convenient, as it removes
empty rows in selected tables (or tables in selected text) only.
To run the script, highlight a table or some text containing a
number of tables, and then double-click on the name of the script in
the Scripts panel.
var mySelection=app.activeDocument.selection[0];
try{ var myTableCount = mySelection.tables.length;}
catch(myError){ var myTableCount = 1;}
for (var i=myTableCount-1; i >=0; i--) {
try{ var myTable = mySelection.tables.item(i);}
catch(myError){var myTable = mySelection; }
for(var j=myTable.rows.length-1; j>=0; j--){
            var myContents = 0;
            for(var k=myTable.rows[j].cells.length-1; k>=0; k--){
                if (myTable.rows[j].cells[k].contents != "") myContents++;
            if (myContents == 0) myTable.rows[j].remove();

Similar Messages

  • Function module table returning empty rows but export data is getting

    Hi,
    I am executing function module through JCO after setting importing parameter and when i retrieve the table i get table with empty data 0 rows but i am able get export parameter data . when execute the same function module in abap through sap gui i get table containing 5 rows. what may be the problem. please find below code 
          function = getDefaultJCoConnection().getJCoFunction("ZCRM_ICSS_PROJ_CUST_USR");
                function.getImportParameterList().getField("USER_ID").setValue("MLDL010");
                getDefaultJCoConnection().execute(function);
                exportTable = function.getTableParameterList().getTable("PROJCUSTLIST");
                int rowsNumber = exportTable.getNumRows(); // companies table number of rows
                log.error("rowsNumber----"+String.valueOf(rowsNumber));
      try
         if (rowsNumber > 0)
         int i = 0;
         do
         tempString="table valuesZCOMP_ID"(String)exportTable.getValue("ZCOMP_ID")"ZCOMP_SPC-"+(String)exportTable.getValue("ZCOMP_SPC")
                     + "table valuesZCOMP_DESC"(String)exportTable.getValue("ZCOMP_DESC")"ZPRICE-"(String)exportTable.getValue("ZPRICE")"---" ;
         log.error(tempString);
         while (exportTable.nextRow());
         catch (Exception th)
         log.error("The following error occured: while retrieving table values ", th);
    Do you have any idea where may be the problem
    Regards,
    Pavan
    Edited by: Pavan Reddy on Apr 10, 2010 4:46 PM

    Hi Pavan,
    This could be the case. The function module might be expecting a value converted into its format.
    By this, I mean that the function module might be expecting 0012345678 for 12345678 (Where data element of the ID is of type CHAR 10 ).
    Please check if it is so.
    Best Regards,
    Kris.

  • Advanced Table delete empty rows

    Hi
    I added logic to add 10 empty rows and to delete the empty rows when the form is submitted. But somehow it only deletes the rows in current screen of the Advanced Table. if there are 15 rows and I click next to go the last 5 and submit the form it deletes only the 5 empty rows but not the other 10 rows in the previous section.
    where am I doing wrong?
    Thanks
        Row [] row = null;
        ExpAttendeesVORowImpl rowi = null;
        if( expattendeesvoimpl1 != null )
            row = expattendeesvoimpl1.getAllRowsInRange();
            System.out.println("No of items "+row.length);
        for (int i=0;i<row.length;i++)
             pageContext.writeDiagnostics(this, "in loop ", 2);
             rowi = (ExpAttendeesVORowImpl)row;
    pageContext.writeDiagnostics(this, " in loop row "+ rowi.getName(), 2);
    if((rowi.getName() == null))
    pageContext.writeDiagnostics(this, "deleting row"+ rowi.getName(), 2) ;
    rowi.remove();
    Thanks

    you could instead try using:
    expattendeesvoimpl1.getFilteredRows("Name", null);

  • Empty rows in a table should not be displayed

    Hi,
    I have an ADF table which contains 10 rows and 5 columsns,
    in which i have rendered all the values in 5 columns of 5 rows to false.
    But when displaying the table,the empty rows are displaying by overlapping..
    I do not want to display those empty rows.
    Thank u
    Bhanu

    Duplicate of How to make some rows of a table invisible
    Frank

  • Delete empty rows while having empty xml tag

    I've seen something like same but it doesn't work for me. I have a table which is created using xml rules, some time it contains empty xml tag also converted into row but I don't want these empty rows. After table creation empty rows need to be deleted.
    I've got this script from this forum which delete empty rows
    for(var i=myDocument.textFrames.length-1; i>=0; i--){
      for(var j=myDocument.textFrames[i].tables.length-1; j>=0; j--){
       for(var k=myDocument.textFrames[i].tables[j].rows.length-1; k>=0; k--){
        myContents = 0;
        for(var l=myDocument.textFrames[i].tables[j].rows[k].cells.length-1; l>=0; l--){
         if (myDocument.textFrames[i].tables[j].rows[k].cells[l].contents != "") myContents++;
         if (myContents == 0) myDocument.textFrames[i].tables[j].rows[k].remove();
    but incase of any cell contains empty xml element it goes blank. Could any one help on this.
    Thanks
    Mac

    Gyan,
    Thanks for your help. I have modified the code as below:
    public void removeblankline()
    OAViewObject rvo = (OAViewObject)findViewObject("NCRPaymentExtLineVO1");
    Row row[] = rvo.getAllRowsInRange();
    System.out.println("Remove all blank rows");
    System.out.println("Total Rows"+rvo.getRowCount());
    int jcount = rvo.getRowCount();
    for (int j=0;j< jcount;j++)
    NCRPaymentExtLineVORowImpl rowj = (NCRPaymentExtLineVORowImpl)row[j];
    System.out.println("Check Line Number: "+j);
    System.out.println("Line Type Lookup Code: "+rowj.getLineTypeLookupCode());
    if((rowj.getLineTypeLookupCode()==null)||("".equals(rowj.getLineTypeLookupCode().trim())))
    System.out.println("Removed Line Number: "+j);
    rowj.remove();
    System.out.println("Processed with Line Number: "+j);
    } // end removeblankline
    This is the change I have done:
    int jcount = rvo.getRowCount();

  • Delete first empty row in a table

    Hi,
    Can you please provide the script for the below requirement.
    Need to delete First empty row in all the tables. (Tables having more number of empty rows. i need to delete first empty row only)
    Regards,
    Velu

    @Velu – the following blog post by Jongware might get you started:
    Tackling Tables through Scripting
    by: Jongware | April 8, 2013
    http://indesignsecrets.com/tackling-tables-through-scripting.php
    Document Object (DOM) documentation:
    Indesign JavaScript Help
    InDesign ExtendScript API (10.0)
    Table Row specifics:
    Adobe InDesign CS6 (8.0) Object Model JS: Row
    InDesign ExtendScript API (10.0)
    Uwe

  • How to delete empty row without validation error in ADF Table(EMP)

    Hi Everyone,
    I am using EMP Table in ADF jspx page to insert the data into database.when i insert a row into table by createInsert operation,it inserting the row.But I need to delete that row immediately with out entering any value.
    But it showing some validation error at empno.Is there any ways to delete the empty row?if not,what are the reasons that we can't delete the row.
    could any one tell me the reasons!!
    Thanks in advance!!
    With Best Regards,
    Amar
    Edited by: 973755 on Dec 11, 2012 6:42 AM

    Amar,
    I am little confused with your logic here.....
    but if you are trying to remove the row by clicking Remove button, you can set the immediate property to true and that remove function will run without executing any entity validation.......
    -R

  • Appending empty rows in internal table

    Hi,
      i am using table control, where there is a condition, some row may left empty. end if i press enter button the empty row is filled by the next available record. My need is to pick the records in the table control to the internal table including the empty rows as it is.

    Hi Karthikeyan,
    By default with user pressinng enter, empty rows will get deleted.
    How are you populating your table control? Is it from standard transaction or your internal table?
    If it is from your internal table, you can add anothe flag field for empty row.
    Whenever row is empty in your internal table, mark flag field as 'X', so in the table control you these entries will not get vanished with pressing of enter.
    This is one idea and you can build on this. You can make this flag column as non editable so that no one can change these.
    hope this helps,
    ags.

  • How to add empty rows in table in smart form

    how to add empty rows in table in smart form?
    plz help me regarding this
    send me ur queries to [email protected]

    You will need to add some extra rows to the internal table that your table is displaying.  Use a program node to append additional rows with a key but no argument.
    Alternaively a template may me more suitable for your requirement than a table.
    Finally, please do not include you e-mail address in your question.  Your question and the answers provided to it are for the benefit of everyone in the Community.
    Regards,
    Nick

  • How to avoid displaying empty rows in a table?

    The situation is as follows:
    I have got a set of questions under a particular category say marketing category.
    The user will be displayed with a table consisting of a set of questions from a particular category with four radio buttons for each question.
    Now once he is done with all the set of questions under a particular category, he will be navigated to the next set of questions under some other category say 'xyz'
    Now instead of creating seperate view objects for each category, we have created a view object which will hold all the set of questions from all the category but will display only the set of questions under a particular category by declaring a variable in the backing bean and setting the question rendering to the value in the variable. the value to the variable will be changed once the user is done with answering all the set of questions under a particular category.
    Now the problem that i am facing is:
    Because of the rendering condition that i have used, it displays only those rows that have the rendering condition set to the variable in the backing and displays all other empty rows overlapped.
    How do i avoid this situation ??

    Seems odd, but you could use COALESCE to achieve this.
    ME_XE?create table all_nullz (col1 number, col2 number, col3 number);
    Table created.
    Elapsed: 00:00:00.20
    ME_XE?
    ME_XE?insert into all_nullz values (1,2,3);
    1 row created.
    Elapsed: 00:00:00.12
    ME_XE?insert into all_nullz values (null, null, null);
    1 row created.
    Elapsed: 00:00:00.06
    ME_XE?
    ME_XE?delete from all_nullz where coalesce(col1,col2,col3) is null;
    1 row deleted.
    Elapsed: 00:00:00.26
    ME_XE?

  • InDesign Tables: Row and Column Strokes

    Using InDesign Tables: How do you get row and column strokes in a table to appear perfectly joined? When I choose "Column Strokes in Front" (Under Table Setup) i still see a tiny row stroke, and vice versus.. it's really visible in the PDF almost can't see it in InDesign though you can a little...any advice?

    http://lawrence.ecorp.net/inet/samples/dhtml-rollover-tble-cols-rows.shtml

  • Count of non-empty rows of a table

    How to I get the number of non-empty rows of a table ?
    Thanks

    You can loops through the rows and check whether any cell is empty or not? Use a counter variable to increment the same.
    Thanks,
    Bibhu

  • Empty rows in advanced table

    Hi there,
    In my advanced table with multiple selection check box, I have the logic to insert 10 rows into the view object before the table is rendered. So my table display 10 new blank rows.
    Assume user only enter 3 rows and I don't want to save those 7 empty rows. How can I recognize the 7 empty rows and remove them from the VO?
    Please advise.
    thanks,
    Charles

    Hi Charles,
    You may be dispalying some columns on OAF page, check all thos for null, if every field is Null then it is unused and you can remove it.
    This is sample code:
    public void deleteUnusedLines()
    XXEGASRLinesVOImpl pervo = getXXEGASRLinesVO1();
    if(pervo==null)
    Row row[] = pervo.getAllRowsInRange();
    System.out.println("No of items "+row.length);
    for (int i=0;i<row.length;i++)
    XXEGASRLinesVORowImpl rowi = (XXEGASRLinesVORowImpl)row;
    if((rowi.getItemDescription()==null)||("".equals(rowi.getItemDescription().trim())))//add more conditions here to locate empty rows.
    rowi.remove();
    Regards,
    Reetesh Sharma

  • InDesign Table Fit (Clear overflow, Height and Row fit)

    Hi All,
    I am using MagicFit.jsx for fit the table. But it does not clear the overflow and it does not fit the Height. I want to do all of this.
    Plz suggest.
    MagicFit.jsx
    function MagicFit(){
        app.scriptPreferences.version = 4.0;          //Because I am using CS5
        MagicFit_1()
        app.scriptPreferences.version = 6.0;
    function MagicFit_1(){
            MagicFit 2.1b for InDesign CS / CS2 -- 01/18/06               
            Fits to content the WIDTH of the selected text container(s)   
            Features:                                                     
            - Fits selected TextFrame(s) width to content                 
            - 1st call: "strict" fitting (preserve each lines length)    
            - 2nd call (within 2 secs) : "fluid" fitting (preserve height)
            - (NEW) Alternate fitting of table column(s) if selected      
            - (NEW) Compute a minimal width by parsing embedded objects   
            - (NEW) Runs on selected frames, CELLS, groups, insertion pt  
            Installation & usage:                                         
            0) !! CS2 users only !!                                       
               Rename this script file with .jsx extension                
               (activating extend script features)                        
            1) Put the present file into the Presets/Scripts/ subdir      
            2) Run InDesign, open a document and select object(s) to fit  
               (or put insertion point into)                              
            3) Run the script via Window > Automation > Scripts           
               and double-clic on MagicFit.js                             
               Alternate way: assign a keyboard shortcut to the script via
               Edit > Keyboard Shortcuts... > Product area:"Scripts"      
            Help (FR) : http://marcautret.free.fr/geek/indd/magicfit/     
                (sorry, thats a french web page!)                      
                    Feedbacks : [email protected]                    
        //            SETTINGS
        var LATENCE = 2;         // in seconds (default:2)
        var PRECISION = 0.5;    // in pts (default:0.5)
        var APP_INT_VERSION = parseInt(app.version);
        //            TOOLBOX FUNCTIONS
        /*void*/ function exitMessage(/*exception*/ ex){
            alert("Error:\n" + ex.toString());
            exit();
        //            DOCUMENT METHODS
        /*void*/ Document.prototype.setUnitsTo = function(/*units*/ newUnits){        // units can be single value (horiz=vert) or array(horizUnits, vertUnits)
            var arrUnits = (newUnits.length) ? newUnits : new Array(newUnits,newUnits);
            this.viewPreferences.horizontalMeasurementUnits = arrUnits[0];
            this.viewPreferences.verticalMeasurementUnits = arrUnits[1];
        /*arr2*/ Document.prototype.getUnits = function(){
            return(Array(
                this.viewPreferences.horizontalMeasurementUnits,
                this.viewPreferences.verticalMeasurementUnits));
        /*bool*/ Document.prototype.withinDelay = function(){
            if (this.label)
                return( (Date.parse(Date())-this.label) <= LATENCE*1000 );
            return(false);
        /*void*/ Document.prototype.storeTimeStamp = function(){
            this.label = Date.parse(Date()).toString();
        //            GENERIC METHODS (OBJECT LEVEL)
        // Returns the "fittable-container" corresponding to THIS
        // Return array or collection HorizFit-compliant
        // NULL if failure
        /*arr*/ Object.prototype.asObjsToFit = function(){
            switch(this.constructor.name){
                case "TextFrame" :            // textframe -> singleton this
                    return(Array(this));
                case "Cell" :                // cells -> parent columns
                    var r = new Array();
                    // !! [CS1] Cell::parentColumn === Cell !!
                    // !! [CS2] Cell::parentColumn === Column !!
                    // !! [CS2] Cells::lastItem().parentColumn BUG !!
                    var c0 = this.cells.firstItem().name.split(":")[0];
                    var c1 = this.cells.lastItem().name.split(":")[0];
                    for (var i=c0 ; i<=c1; i++)
                        r.push(this.parent.columns[i]);
                    return(r);
                case "Table" /*CS2*/ :        // table -> columns
                    return(this.columns);
                case "Group" :                // group -> textFrames
                    return((this.textFrames.length>0) ? this.textFrames : null);
                case "Text" :                // selection is Text or InsertionPoint
                case "InsertionPoint" :        // -> run on container
                    var textContainer = this.getTextContainer();
                    return((textContainer) ? textContainer.asObjsToFit() : null);
                default:
                    return(null);
        // Returns Text's or InsertionPoint's container :
        // Type returned: TextFrame or Cell - NULL if failure
        /*obj*/ Object.prototype.getTextContainer = function(){
            try{ // try...catch because of CS2 behaviour
                if (this.parent.constructor.name == "Cell")           
                    return(this.parent);
                if (this.parentTextFrames)        // plural in CS2
                    return(this.parentTextFrames[0]);       
                if (this.parentTextFrame)    // single in CS1
                    return(this.parentTextFrame);
                return(null);
            }catch(ex) {return(null);}
        // Parse embedded "objects": tables, pageitems [including graphics]
        // and returns the max width
        // !! All parsed objects have to provide a computeWidth method !!
        /*int*/ Object.prototype.computeIncludedObjectsWidth = function(){
            var objsNames = new Array("pageItems","tables"); // could be extended
            var objsWidth = 0;
            var w = 0;
            for (var j=objsNames.length-1 ; j>=0 ; j--){
                for (var i=this[objsNames[j]].length-1 ; i>=0 ; i--){
                    try{
                        w = this[objsNames[j]][i].computeWidth({VISIBLE:true});
                    }catch(ex){
                        w=0;
                    if (w > objsWidth) objsWidth=w;
            return(objsWidth);
        // Generic computeWidth method for bounded objects
        // VISIBLE true -> external width
        // VISIBLE false -> internal width
        /*int*/ Object.prototype.computeWidth = function(/*bool*/ VISIBLE){
            if (VISIBLE){
                if (this.visibleBounds)
                    return(this.visibleBounds[3]-this.visibleBounds[1]);
            else{
                if (this.geometricBounds)
                    return(this.geometricBounds[3]-this.geometricBounds[1]);
            return(0);
        // Override Object::computeWidth for Table : returns simply the width
        /*int*/ Table.prototype.computeWidth = function(){
            return(this.width);
        // Returns chars count for each LINE of this (-> array)
        // empty array  IF  this.lines==NULL  OR  this.lines.length==0
        /*arr*/ Object.prototype.createLinesSizesArray = function(){
            r = new Array();
            if (this.lines)
                for (var i=this.lines.length-1; i>=0 ; i--)
                    r.unshift(this.lines[i].characters.length);
            return(r);
        // Compare chars count beetween THIS and arrSizes argument
        // (generic method just presuming that THIS have lines prop.)
        // -> TRUE if isoceles, FALSE if not
        /*bool*/ Object.prototype.isoceleLines = function(/*arr*/ arrSizes){
            if (this.lines.length != arrSizes.length) return(false);
            for (var i=arrSizes.length-1 ; i>=0 ; i--)
                if (arrSizes[i] != this.lines[i].characters.length)
                    return(false);
            return(true);
        //            TEXTFRAME METHODS
        // intanciate the part of the abstract process for TextFrames
        /*bool*/ TextFrame.prototype.isEmpty = function(){
            return(this.characters.length==0);
        /*bool*/ TextFrame.prototype.isOverflowed = function(){
            return(this.overflows);
        /*int*/ TextFrame.prototype.getWidth = function(){
            return(this.computeWidth({VISIBLE:false}));
        // Redim the frame in width by widthOffset
        /*void*/ TextFrame.prototype.resizeWidthBy = function(/*int*/ widthOffset){
            this.geometricBounds = Array(
                this.geometricBounds[0],
                this.geometricBounds[1],
                this.geometricBounds[2],
                this.geometricBounds[3] + widthOffset);
        // Returns the minWidth of the frame according to embedded content
        // and inner space
        // inner width space
        /*int*/ TextFrame.prototype.computeMinWidth = function(){
            var inSpace = this.textFramePreferences.insetSpacing;
            var inWidth = (inSpace.length) ?
                inSpace[1] + inSpace[3] :    // distinct left & right inspace
                2*inSpace;                    // global inspace
            return(this.computeIncludedObjectsWidth() + inWidth);
        /*int*/ TextFrame.prototype.getCharsCount = function(){
            return(this.characters.length);
        /*int*/ TextFrame.prototype.getLinesCount = function(){
            return(this.lines.length);
        // Return chars count BY LINE (-> array)
        /*arr*/ TextFrame.prototype.getLinesSizes = function(){
            return(this.createLinesSizesArray());
        // YES -> -1  , NOT -> 1
        /*int*/ TextFrame.prototype.preserveCharsCount = function(/*int*/ charsCount){
            return( (this.characters.length != charsCount) ? 1 : -1 );
        // Indicates whether:
        // - chars count equals linesCount
        // - frame DOES NOT overflow
        // YES -> -1  , NOT -> 1
        /*int*/ TextFrame.prototype.preserveLinesCount = function(/*int*/ linesCount){
            return( ((this.overflows) || (this.lines.length != linesCount)) ? 1 : -1 );
        // Indicates whether:
        // each x line isoceles linesSizes[x]
        // YES -> -1  , NOT -> 1
        /*int*/ TextFrame.prototype.preserveLinesSizes = function(/*arr*/ linesSizes){
            return( (this.isoceleLines(linesSizes)) ? -1 : 1 );
        //            COLUMN METHODS
        // intanciate the part of the abstract process for Columns
        /*bool*/ Column.prototype.isEmpty = function(){
            for (var i=this.cells.length-1; i>=0 ; i--)
                if (this.cells[i].characters.length>0) return(false);
            return(true);
        // Indicates whether AT LEAST a cell overflows
        // !! We can't trust Column::overflows !!
        /*bool*/ Column.prototype.isOverflowed = function(){
            for (var i=this.cells.length-1 ; i>= 0 ; i--)
                if (this.cells[i].overflows) return(true);
            return(false);
        /*int*/    Column.prototype.getWidth = function(){
            return(this.width);
        // Redim the column width by widthOffset
        // !! we HAVE TO update the display after resizing !!
        /*void*/ Column.prototype.resizeWidthBy = function(/*int*/ widthOffset){
            this.width += widthOffset;
            // updates the display
            if (APP_INT_VERSION > 3)        // CS2+
                this.recompose();
            else{
                // CS -- thx to Tilo for this hack --
                for(var i = this.cells.length - 1 ; i >= 0 ; i-- ){
                    // Comparing the cell contents against null
                    // seems to internally recompose the cell!
                    if (this.cells[i].contents == null) {}
        // Returns the minWidth of the column according to embedded content
        // and inner space
        /*int*/ Column.prototype.computeMinWidth = function(){
            var iCell = null;
            var w = 0;
            var r = 0;
            for (var i=this.cells.length-1 ; i>= 0 ; i--){
                iCell = this.cells[i];
                w = iCell.computeIncludedObjectsWidth() +
                    iCell.leftInset + iCell.rightInset;
                if (w > r) r = w;
            return(r);
        // Returns SIGNED chars count BY CELL (negatif if overflows)
        /*arr*/ Column.prototype.getCharsCount = function(){
            var r = new Array();
            var sgn = 0;
            for (var i=this.cells.length-1 ; i>= 0 ; i--){
                sgn = (this.cells[i].overflows) ? -1 : 1;
                r.unshift(sgn * this.cells[i].characters.length);
            return(r);
        // Returns lines count BY CELL
        /*arr*/ Column.prototype.getLinesCount = function(){
            var r = new Array();
            for (var i=this.cells.length-1 ; i>= 0 ; i--)
                r.unshift(this.cells[i].lines.length);
            return(r);
        // Matrix: returns the chars count BY LINE / BY CELL
        /*bi-arr*/ Column.prototype.getLinesSizes = function(){
            var r = new Array();
            for (var i=this.cells.length-1 ; i>= 0 ; i--)
                    r.unshift(this.cells[i].createLinesSizesArray());
            return(r);
        // Indicates whether:
        // overflow sign BY CELL x equals sgn(charsCount[x])
        // YES -> -1  , NO -> 1
        /*int*/ Column.prototype.preserveCharsCount = function(/*arr*/ charsCount){
            var sgn = 0;
            for (var i=this.cells.length-1 ; i>= 0 ; i--){
                sgn = (this.cells[i].overflows) ? -1 : 1;
                if (sgn * charsCount[i] < 0) return(1);
            return(-1);
        // Indicates whether:
        // - lines count BY CELL x equals linesCount[x]
        // - no cell overflows
        // YES -> -1  , NO -> 1
        /*int*/ Column.prototype.preserveLinesCount = function(/*arr*/ linesCount){
            for (var i=this.cells.length-1 ; i>= 0 ; i--){
                if (this.cells[i].overflows) return(1);
                if (this.cells[i].lines.length != linesCount[i]) return(1);
            return(-1);
        // Indicates whether:
        // - in each CELL x, each LIGNE y isoceles linesSizes[x][y]
        // (if a cell overflows, returns 1)
        // YES -> -1  , NO -> 1
        /*int*/ Column.prototype.preserveLinesSizes = function(/*bi-arr*/ linesSizes){
            for (var i=this.cells.length-1 ; i>= 0 ; i--){
                if (this.cells[i].overflows) return(1);
                if (this.cells[i].isoceleLines(linesSizes[i]) == false) return(1);
            return(-1);
        //            METHODES CENTRALES
        // !! [CS2 only] Prevents a strange crash on wide table columns selection !!
        // !! Thx to Tilo for this hack --
        /*void*/ Object.prototype.manageFit = function(/*bool*/ FLUIDFITTING){
            if (APP_INT_VERSION>=4){
                $.gc();
            // NOP if empty object
            if (this.isEmpty()) return;
            // min width to preserve
            var minWidth = this.computeMinWidth();
            // let's go!
            this.processFit(FLUIDFITTING, minWidth);
        // Fits this object
        // if FLUIDFITTING -> fluid fitting, else: strict fitting
        // minWidth sets the threshold
        /*void*/ Object.prototype.processFit = function(/*bool*/ FLUIDFITTING, /*int*/ minWidth){
            if (FLUIDFITTING){ // FLUID FITTING
                if (this.isOverflowed()){ // NB : overflowed CELLS are "transparent"
                    var charsCount = this.getCharsCount();
                    var evalFlag = function(thisObj){return(thisObj.preserveCharsCount(charsCount));}
                else{
                    var linesCount = this.getLinesCount();
                    evalFlag = function(thisObj){return(thisObj.preserveLinesCount(linesCount));}
            else{ // STRICT FITTING
                  // NB : overflowed columns are "intouchable"
                if ((this.constructor.name=="Column") && (this.isOverflowed()))
                    return;
                var linesSizes = this.getLinesSizes();
                var evalFlag = function(thisObj){return(thisObj.preserveLinesSizes(linesSizes));}
            // DICHOTOMIC LOOP
            var sgnFLAG = -1;
            var w = ( this.getWidth() - minWidth ) / 2;
            while (w >= PRECISION){
                // resize width by +/- w
                this.resizeWidthBy(sgnFLAG*w);
                // +1 = increase | -1 = reduce
                sgnFLAG = evalFlag(this);
                // divide
                w = w/2;
            // exit with sgnFLAG==+1 -> undo last reduction -> +2w
            if (sgnFLAG>0) this.resizeWidthBy(2*w);
        // MAIN PROGRAM
        if ( app.documents.length > 0 ){
            if ( app.activeWindow.selection.length > 0 ){
                try{
                    var thisDoc = app.activeDocument;
                    var FLUIDFLAG = thisDoc.withinDelay();
                    var memUnits = thisDoc.getUnits();
                    thisDoc.setUnitsTo(MeasurementUnits.points);
                    var selObjs = app.activeWindow.selection;
                    var objsToFit = null;
                    for (var i=selObjs.length-1 ; i>=0 ; i--){
                        objsToFit = selObjs[i].asObjsToFit();
                        if (objsToFit){
                            for (var j=objsToFit.length-1 ; j>=0 ; j--)
                                objsToFit[j].manageFit(FLUIDFLAG);
                    thisDoc.setUnitsTo(memUnits);
                    thisDoc.storeTimeStamp();
                }catch(ex){
                    thisDoc.setUnitsTo(memUnits);
                    exitMessage(ex);
            else
                alert("No object selected!");
        else
            alert("No document opened!");

    InDesign table cells don't break across pages the way they do in Word. It's all or nothing.

  • Create Table with extra empty row

    Hi,
    I have two problems...
    I need to create a table from DB with one extra empty row.
    Is there an easy way to do this?
    And I need a button to delete all in that table.
    something like SQL:
    delete from tableX
    Anything that helps me on the way... what I should look for?

    835652 wrote:
    Hi,
    I have two problems...
    I need to create a table from DB with one extra empty row.
    Is there an easy way to do this?this is strange requirement can you clear what is your use case ?
    >
    And I need a button to delete all in that table.
    something like SQL:
    delete from tableX
    Anything that helps me on the way... what I should look for?Try this http://baigsorcl.blogspot.com/2010/11/how-to-execute-sql-dml-statements-in.html

Maybe you are looking for

  • How do i format a memory card on my mac?

    I don't get a choice to format the sd card (actually via an adapter I plug into the USB port that holds various memory cards) - not sure if formating the sd card would actually eliminate the virus, but thought I'd try...  The card is infected with a

  • MSI Big Bang-XPower New Build Compatibility Questons

    I am doing my first build, and do not see several components I have selected (some already purchased) for my new system in the MSI compatibility literature for the Motherboard.  Can someone please advise if any of the below components will cause issu

  • Take long time to get data

    Hi, I have one ABAP code to load data to internal table, if the code is select * from xxxx into  itab where ...., then it works property. However I don't want to load whole table into internal table, I want to load the data based on another internal

  • Matching in a doc file

    I want to match a string in a doc file how can I do that ?

  • Will these apps work in 10.4?

    Hello all. I've done some searching, and have not found definate answers on this... I am looking to upgrade from 10.3.x to 10.4. I am wondering if anybody has firsthand knowledge of the following apps. working in 10.4? Photoshop 7 HCP HD 4.5 After Ef