How to resolve merge empty cells JS error

Hi Scripters
I am new to scripting and now looking into it.
I am trying to write a table script for that, I found one merge empty cells JS from Jongware GfBROo
table = app.selection[0];
if (!(table instanceof Table)) table = table.parent;
if (table instanceof Cell) table = table.parent;
if (table instanceof Table)
     for (r=0; r<table.rows.length; r++)
          c = 0;
          while (c < table.rows[r].cells.length)
               while (c < table.rows[r].cells.length &&
                    table.rows[r].cells[c].contents.length > 0)
                    c++;
               while (c < table.rows[r].cells.length &&
                    table.rows[r].cells[c].contents.length == 0)
                    table.rows[r].cells[c].merge (table.rows[r].cells[c-1]);
Even though for almost tables it's working like charm but in some of the cases it's falling me in trouble by showing this error "Object is Invalid" at bold face line.
Though I can guess some problem wolud be with those tables but I am not able to catch it.
Could any one any way suggest me to resolve this error.

Thanks for reply Loic_aigon
As Marc suggested in discussion, I used
myTable.rows[r].cells[c].characters.everyItem().contents.length > 0
But above syntex falls script to infinite loop.
any other help will be appreciated.

Similar Messages

  • How to resolve Unexpected End of file error in Web Crawling

    how to resolve Unexpected End of file error in Web Crawling....
    I am getting java.net.SocketException :Unexpected End of file error in Web Crawling.
    How to get rid of this error.
    Please help anybody ASAP.

    1. Handle this exception - not recommended since you will be creating an exception handling overhead unnecessarily.
    2. Check for EOF using available() method in InputStream. It returns 0 if there are no bytes to read.

  • How to resolve After Effects CC 2014 error:

    how to resolve After Effects CC 2014 error: Could not create the file '/Users/User/Library/Preferences/Adobe/After Effects/13.0/dummy'.
    Every time I try launch any of my CC programs, i keep getting this error message, has anyone come across this before?
    I tried uninstalling and but still got the same error after the reinstalling

    fixing permissions problem that impedes start of Adobe applications

  • How to resolve Message "Incorrect translation in error saving docuemnt message"?

    As of 29/Jan/2014, I only get this message from Adobe Reader of iPad (Japanese environment)
    Regardless of my subscription, I cannot convert anything to PDF.
    How to resolve or get money back?

    Hi
    Could you please try the following steps to confirm that your subscription went through?
      1.  On a computer, browse to files.acrobat.com and log in with your Adobe id.
      2.  Upload some files to your account.
      3.  Now on your iPad, launch Adobe Reader and tap on Acrobat.com. You should see the uploaded documents there.
      4.  Open any document and try and convert it to another format/pdf.
    Do the documents convert successfully? Now try to do the same conversion of any document under your Documents list. What happens? Do you see the same error?
    Thanks
    Shradha

  • How to fill an empty cell with the value above

    Hello,
    Please help me on the following issue related to BEx query and it's output in BEx analyzer as well as on Web.
    I am trying to modify a query output where the empty cells are to be filled with the value in the above cell.
    e.g. there is a column for transaction number, and this transaction number is the same for three rows, so it turns out to be two empty cells and only appears as if the transaction number applies to the first row only.
    not sure how to paste screenshot or attach document but would love to provide more information if the above isn't suffice.
    Please advise on what and where to modify in BEx designer.
    Thank you for your help!

    Thanks a lot...yes, now it works in BEx Analyzer but for some reason doesn't work in the Web view.
    Any ideas why is that?
    Thanks again for your prompt help.
    Edited by: One Idea on Jan 15, 2009 12:17 AM

  • How to resolve the z table activation error?

    I have a Z table.
    Added a couple of fields and activated it. it was fine.
    then changed one of the fields as a key field and activated it.
    it took a long time even though there is no data and terminated.
    I removed the key indicator and tried activating it. it showed errors.
    Then I deleted it using SE14 and recreated with the same name. Now I am getting the following error:
             See log E4911620080227134551:ACT                                                                               
    TABL ZPRICECONDN was not activated                                                     
          Check table ZPRICECONDN (E49116/02/27/08/13:45)                                        
          Enhancement category for table missing                                                    
    /     Table ZZPRICECONDN: Key length > 120 (Restricted functionality)                         
          A table called ZPRICECONDN exists in the database                                      
    /     No active nametab exists for ZPRICECONDN                                               
          Termination due to inconsistencies                                                        
    /     Table ZPRICECONDN (Statements could not be generated)                                  
    /     Error number in DD_DECIDE (9)                                                             
    /     Check on table ZPRICECONDN resulted in errors                                          
    How to resolve this?
    Do I have to do any database manipulations?
    I looked at 306296 but DROP command is not available in ABAP?
    Pl advise.
    Thanks
    Ven

    Hi,
      Whenever you make some changes to the database table, you need to activate it through the
    database utility function (SE14).
    Enhancement category for table missing: 
      to resolve this: SE11>>Table name>> Extras>>Enhancement category...and choose the option 'can be enhanced'.
    / Table ZZPRICECONDN: Key length > 120 (Restricted functionality)
       Reduce your key fields length to <120.
    After doing those changes activate it through the database utility.
    I hope, it will work for you.
    Regards,
    Jallu

  • How to resolve Nota Fiscal Internal Verification error?

    Can someone please help me determine how to resolve an error with a Nota Fiscal Electronica?  An NF-e doc was manually created using (J1B1N) but it will not go through to the government.  There's an error that the CFOP description is missing in the header (however, the description for the CFOP has been maintained).  The status of the NF-e doc is '8' (Internal Validation error in messaging system.  Send again!).  What other data (vendor master, customer master, J1B1TAX config) can I check to resolve this error?

    Hello,
    Did you check with the metalink ora-600 troubleshooter?
    May be the below description helpful to you:
    Note: For additional ORA-600 related information please read Note 146580.1
    PURPOSE:
    This article represents a partially published OERI note.
    It has been published because the ORA-600 error has been
    reported in at least one confirmed bug.
    Therefore, the SUGGESTIONS section of this article may help
    in terms of identifying the cause of the error.
    This specific ORA-600 error may be considered for full publication
    at a later date. If/when fully published, additional information
    will be available here on the nature of this error.
    SUGGESTIONS:
    Execute the following command on all tables in question.
    SQL> ANALYZE TABLE <tablename> VALIDATE STRUCTURE CASCADE;
    Reference Note 28814.1 Handling Oracle Block Corruptions in Oracle7/8/8i
    If the Known Issues section below does not help in terms of identifying
    a solution, please submit the trace files and alert.log to Oracle
    Support Services for further analysis.
    Known Issues:
    Bug# 6709070 See Note 6709070.8
    OERI [6780] for DML against a compressed data block
    Fixed: 10.2.0.5, 11.2
    ****************************************

  • How to get an empty cell when SUM cells are empty?

    When doing a SUM, I want the result to be blank if there are no numbers yet. In Excel, if you have =SUM(A6:A30) with empty cells, the result is an empty cell.
    In Numbers, it's a zero.
    I know you can use =IF(SUM(A6:A30)>0,SUM(A6:A30),"") to put an empty string in the cell if there's nothing to add, but this doesn't work for negative numbers.
    I tried =SUMIF(A6:A30,"count(A6:A30)>0") and it puts a zero there even if all the cells are blank, and I don't think it's correct anyway.
    =IF(SUM(A6:A30)>0,SUM(A6:A30),(IF(SUM(A6:A30)<0,SUM(A6:A30),"")))
    works, but it seems rather cumbersome.
    Is there a better way?
    Ideas?

    Terrell Smith wrote:
    =IF(SUM(A6:A30)>0,SUM(A6:A30),(IF(SUM(A6:A30)<0,SUM(A6:A30),"")))
    works, but it seems rather cumbersome.
    </div>
    Hello
    The best way I found to solve your problem is:
    =IF(COUNT(A6:A30),SUM(A6:A30),"")
    Which reads:
    if at least one cell of the range (A6:A30) contains a numeric value returns SUM(A6:A30)
    else
    returns a blank cell.
    Of course, if the sum is nil the displayed [thanks you Barry ;-)] value will be a zero.
    Maybe it's what schubladenschrank was offering but I don't read Deutsch.
    Just for info, your formula may be shorten as:
    =IF(SUM(A6:A30)=0,"",SUM(A6:A30))
    Yvan KOENIG (from FRANCE samedi 2 février 2008 13:55:43)

  • RoboHelp 8 - how to resolve rhbuildtag.apj/.cpd file errors?

    Hi there,
    I’m using RoboHelp 8 (with service packs, version number is 8.0.2.208). There are two writers on our team (in separate offices) and we use SVN (via Tortoise SVN) to version all our source files. Our Online Help is comprised of about 30 individual help projects that we merge at build time. We work locally on our own machines and commit everything to SVN each evening.
    We (mainly me) have had ongoing problems with .cpd files getting corrupted (I’m in the company 5 months). I’ve followed all the good advice I’ve seen on forums about renaming/deleting them and letting the affected RoboHelp project re-create it when I start it up again. This has worked until now.
    Also note, that I got a new machine early this week and I brought all our source files down successfully from our SVN repository after we installed RoboHelp. Happy days.
    Yesterday in one Help project I received the following error messages and noticed that the Conditional Build Tags were not listed in the CBT Pod, despite being present in the topic themselves.
    An error occurred while trying to read data from <Project Path\Project Name\rhbuildtag.apj> <1>
    Your project file, C:<Project Path\Project Name\project.cpd, is corrupt and cannot be opened. Try deleting this file and reopening the project.
    I consulted with my colleague this morning and his local project is fine – all conditions present and correct and no CPD error message. He committed his project to SVN and I updated but still no luck.
    Despite having the latest versions from our repository anyway, I tried copying the contents of his rhbuildtag.apj file to mine but that made no difference at my side. I renamed/deleted CPD files several times over but project still won’t open. I deleted my local working versions of all our Help projects and brought them down from our SVN repository - twice. No luck.
    I’m flummoxed as how to fix this project/restore conditions to CBT Pod?
    Why would I have ongoing CPD issues and my colleague not?
    My colleague is offline until the morning (different time zones) so will catch up with him then again. It seems to be something very local to my setup.
    Many thanks in advance for any wise words offered.

    Hi folks,
    Just to let you know that we resolved our problems with our misbehaving rhbuildtag.apj and .cpd project files. 
    As I mentioned previously, my colleague's version had been working fine. This was the very puzzling bit as I was pulling the exact same set of project files from our SVN repository. 
    Since yesterday...
    From these forums, I discovered the 'Clear project cache(.cpd) before opening any project' check box in the Tools > Options dialog. That wasn't selected in my troubled project (was able to get into the project earlier in the day). It was selected in other projects so selected it but it made no difference.
    I then asked my colleague this morning to check if that check box was selected on his working copy of the project, reasoning that maybe if it was selected on mine and not his, it could cause some kind of disparity.
    Wrong move. Very wrong move. Clearing his cache file caused him to get the same errors as I had got. So while we had the exact same rhbuildtag.apj file, there must have been something in his old cache file, keeping this error at bay. We don't version the .cpd files so his file would have been particular to his local working version of the project.
    So another step back - now a corrupt project at both offices.
    I then took another look at the contents of the troublesome rhbuildtag.apj file. I had noticed yesterday that there was something funny about one condition that I added back in October - a condition based on a release number (6.3.12). There were two instances of it in the file - looked to be saved twice though the condition was only ever added once and displayed once in the project CBT pod. See the attached screenshot. Also There was some markup around it that didn't make sense, looked like the file had saved badly. I compared it to other working build tag files in other projects (and while the conditions would vary slightly across the projects, they should be very similiar. I saw nothing like it.
    I saved the contents of my file locally (though being versioned in SVN would have had a backup anyway).
    I deleted out one of the duplicate 6.3.12 conditions and removed the funny mark up.
    And lo and behold our project opened successfully.
    I commited my changes to the rhbuildtag.apj file back to SVN. My colleague updated his version and his problems too are resolved.
    Root cause:
    Looks like our woes were caused by a corrupt condition in the rhbuildtag.apj file, which then caused the .cpd file to crash.
    Resolution:
    Identified duplicate condition tags and superfluous markup in the rhbuildtag.apj file and remove them (after making a copy). My previous machine was terribly slow and RoboHelp oftened crashed due to the poor machine performance. This could be one plausible cause for the corrupt condition.
    Given we added this condition back in October, I'm not sure why the problem only cropped up now as we would have made changes to the project since then. But such is RoboHelp and our daily battles.
    Hope this info is of help to someone out there.
    Thanks for all the replies - much appreciated.

  • How can I merge the cells of excel with using DOI technique?????

    Hello,everybody
    I met a quesetion.
    Now I'm impoving the performance of one program which is used to output data into the excel file.
    Old program used OLE technique, so it runned a very very long time.
    Now I want to change it by using the DOI technique.But I don't know how to merge the excel's cells with
    this technique(DOI).
    Can somebody give me some useful advices?
    I will deeply appreciate for your help.
    Chen

    Hi JUNHUA,
    Check with the [merge cell in DOI|merge cell in DOI ?]
    hope it helps you.
    Regards!

  • How do i merge empty bootcamp and original mac drives

    i deleted windows files from my bootcamp drive and would now like to merge teh two drives into one macintosh drive.
    how do i do that?
    thanks.
    rhj

    Use Boot Camp Assistant to remove, then repair the drive.
    If you can't extend or if all the space is not returned and there is more than 5GB of 'lost space' you might need to  update your backups and do a full Erase and Restore.
    Those are partitions. Not two drives.

  • How to resolve and debug access violation Error.

    Hello
    I'm stucked with an access violation error which forces my exe build to shut down. I tried also from development environment but its the same there. The error happens after 5-60minutes.
    I played around with disabling a part of the program where it was possible and I think I'm now able to accuse the vi "gastimer.vi". But since this vi leads through the measurement procedure, there are some commands outgoing which I was not able to map one to one.
    My question is: what can cause such access violation errors? I have no dll calls, no third party library, actually the hardware communication is done serial by COM ports. The architecture principle is something adapted from producer consumer loop, except that i have often more than one consumer, so I called them like controller loop - multiple task. The communication within this loops (tasks) are done by queue cluster with an enumerator and variant.
    The indicted vi "gastimer.vi" was transfered from an older and more simply architecture. This vi works with sequence structure and a lot of local variables.
    Since I'm testing sensor on their response to gas concentration I have 10 comports to which I'm listening in parallel.
    What styles or archtiecture are prone to access violations? Where can they happened? where should I look more carefully in the code?
    How can I use the desktop execution trace toolkit to get more information about the cause of the access violation?
    Attached are two different lvlog but I guess with the same error source. In the second lvlog are two vi's named. What have they to do with the access violation error? What kind of information can i get from these lvlog files?
    Last attachement shows a runtime fatal error which happens quite a bit frequently in the recent time when working with this project. Might there be a connection, propably a crashed vi, typedef or whatever?
    Thanks for any help
    U. Siegenthaler
    Solved!
    Go to Solution.
    Attachments:
    first.zip ‏203 KB
    second.zip ‏40 KB
    Fatalerror.PNG ‏21 KB

     Have you checked your code to try to isolate any areas of possible memory leaks? I was able to find some discussion forums with similar problems. Check out the links below to see if any of these resources can be of assistance to you. 
    "Exception: Access violation (0xC0000005) at EIP=0xFDD76383" 
    http://forums.ni.com/t5/LabVIEW/Exception-Access-violation-0xC0000005-at-EIP-0xFDD76383/m-p/2257502 
    "Exception: access violation (0xc0000005) at EIP=0x00BD0984 " 
    http://forums.ni.com/t5/LabVIEW/Exception-access-violation-0xc0000005-at-EIP-0x00BD0984/m-p/2303864 
    "Access violation (0xC0000005)" 
    http://forums.ni.com/t5/LabVIEW/Access-violation-0xC0000005/m-p/2269694 
    Let me know what you find and if you have any other questions. 
    Best regards
    Matijas

  • How do I avoid empty cells/rows being rendered in resized ListView?

    I have a ListView resized to fit my scene
    When I populate this with a smaller number of rows than there is room for, 'empty' rows are filling the rest of the list.
    Is there anyway I can avoid those filler rows?
    Thank you!
    Best regards,
    Aksel,
    Denmark

    If you're not wanting the alternative row highlighting in empty rows, you can modify the caspian.css to change this. Off the top of my head, you'll want to set a rule in your CSS along the following lines:
    .list-cell:odd:empty {
        -fx-background-color: white;
    }If you are not wanting the alternate row highlighting in any rows, you'll want to do something like this:
    .list-cell:odd {
        -fx-background-color: white;
    }Hope that helps,
    -- Jonathan
    Edited by: Jonathan Giles on Nov 16, 2011 6:15 PM

  • How to resolve "Unable to Generate Thumbnail"  error when inserting google calendar as HTML object.

    Using Mac OSX 10.9, Muse 2014.2.
    Message shows up in Design or preview modes.   I do see the calendar when I view site in browser.  Unfortunately I can't manipulate it at all since all I see is an error message in Design mode.
    Thanks

    Using Mac OSX 10.9, Muse 2014.2.
    Message shows up in Design or preview modes.   I do see the calendar when I view site in browser.  Unfortunately I can't manipulate it at all since all I see is an error message in Design mode.
    Thanks

  • How to resolve the serial communicat​ion error in HP34970?

    I want to use serial port to commnucation between pc and hb34970. In gpib mode, it is ok. But in serial mode, report error. just like this:
    for setting com2: 
    16:11:47.359 2009-8-26 [Init_dq_Device]error:-1073807339--HP34970A Initialize.vi->Init_DQ_Device.vi->main_app.vi VISA read.visa name:ASRL2::INSTR
    for setting com1:
    16:13:25.921 2009-8-26 [Init_dq_Device]error:-1073807339--HP34970A Initialize.vi->Init_DQ_Device.vi->main_app.vi VISA read.visa name:ASRL1::INSTR
    I don't know the meaning of -1073807339 and whether i should set:ASRL1::INSTR for com1. Anyone can help me about this problem.
    Thanks very much.
    attach my subvi.
    Solved!
    Go to Solution.
    Attachments:
    Init_DQ_Device.vi ‏48 KB

    Hi, Dennis Knutson
    very glad to see you.
    For my vi, i only provide a UI for user to select GPIB or serial mode, and setting related port.
    About "Also, the 34970 llb you are using should be replaced with the 8.x project library.", What do you
    mean? There is a new driver for 34970,right?
    I search the forum and find a old thread:Agilent 34970 Visa Timeout.
    There is your answer:
    I made a mistake. The initialize function already had a timeout function. I just didn't look at the VI closely enough. There is a case statement that sets either the serial port parameters or just sets the VISA timeout. If you are setting the timout right after the VISA Open, it's just getting set back to 10 seconds. Change it in the case statement and see if that works. Sorry, and I hope this works.
    Do you think this is the same with my problem? Your mean to modify default 10 seconds to more longer timeout,right? 
    Thanks.

Maybe you are looking for

  • Background job list output

    hi friends, i have a report that i submit to run as background job...in this report there are outputs, e.g. "WRITE" statements...how can i make those visible on screen ? regards, clemens

  • Problem with Consolas font in a form

    I have problem with Consolas font in a form in latest Adobe Reader (v11.0.9) It shows dots (password sign) instead of letters. Edit box is not configured for passwords. Form was created by Foxit PhantomPDF and it shows correctly in Foxit. Can somebod

  • Acrobat 9 OCR problems

         Although this already had a discussion, the replies there didn't solve my problems. OCR in 9 crashes almost all the time and I have applied all the updates available to date. Version 8 works fine but I already upgraded most computers to 9 thinki

  • Burned DVDs Won't Mount

    Recently after burning DVDs - via DiskUtility and iDVD - burned DVDs will not mount: Instead after inserting and waiting the DVD simply is spit back out. Yes, I've run Disk Warrior; did fsck -y; Onyx. What can I do now?

  • Internationalization

    I developing a strategy for internationalizing our company's middle-ware product. While I have no problem with the GUI's, exceptions, log files etc, I have no concept of how things like classpaths and packages can be specified in an asian language. F