[CS2/CS3 JS] Merged Cell Problem...

Hi,
Below is a part of my script that has been giving me a problem with merged cells:
if (myTable.cells.item(h).bottomEdgeStrokeWeight > 0.5) {
myTable.cells.item(h).bottomEdgeStrokeWeight = 2;
myTable.cells.item(h).bottomEdgeStrokeType = "Thick - Thick";}
Everytime the script passes on a merged cell, it quits and it only do changes on the first cell of the merged cells. Once I run my script again, it quits with error because the first cell of the merged cells now has a different stroke weight than the rest of the merged cells.
Is there a way to apply stroke on merged cells? And what is the parameter for UNMERGE? Thanks.

Hi Joaquin,
Here are a few examples – hope it helps.
Kasyan
// lets assume myTable has 4 rows and 4 columns
myTable = app.activeDocument.stories[0].tables[0];
myStartCell = myTable.cells.item("0:0"); // cell in the 1st column and 1st row
myEndCell = myTable.cells.item("0:3");  // cell in the 1st column and 4th row
myStartCell.merge(myEndCell);
// now merged cells have become the cell in the 1st column and 1st row
myMergedCell = myTable.cells.item("0:0");
myMergedCell.unmerge();
// merge/unmerge the last row
myTable.cells.item("0:3").merge(myTable.rows.item(-1));
myTable.cells.item("0:3").unmerge();
// merge/unmerge the last column
myTable.columns.item(-1).cells.item(0).merge(myTable.columns.item(-1).cells.item(-1));
myTable.columns.item(-1).cells.item(0).unmerge();

Similar Messages

  • [CS3/CS4 JS] How can you get the associatedXMLElement of a merged cell in a table?

    Hi!
    Inserting a table, and autotagging it, I get a table with a number of cell elements in the XML Structure.
    Selecting an item in the table, I can find the associated XML by the following line of code:
    app.selection[0].associatedXMLElement
    My problems begin when cells are merged. Then the associatedXMLElement for the cell returns null.
    How can I find the associatedXMLElement for a merged cell?
    Using the getElements makes no difference.
    app.selection[0].getElements()[0].associatedXMLElement
    (returns null)
    In the XML structure I can see that the merged cell is still associated to an XML Element, which becomes underlined and also referrs back to the cell, selecting it when double clicking the XML Element link in the structure.
    Is there no way to get to the xml element of a merged cell?
    I have tested in CS3 and CS4 as well, and they act in the same way.
    I also found a similar, unanswered, question from Anne-Laure Jallon in the "With CS3, some things have changed" ( http://forums.adobe.com/message/1105813#1105813 ):
    Hello,
    I'm working with VBscript.
    Is there a difference between cell.associatedXmlElement in CS2 and CS3?
    All my cells in CS2 had an associatedXmlElement.
    In CS3, my table has an associatedXmlElement, but all its cells don't (The value is Nothing)
    Is this a bug? Is it linked with XML evolution?   Thanks Anne Laure
    Adding some more info:
    I made a test, by selecting the XMLElement in the structure, and from that object finding the cell, and finding back to the assiciatedXMLElement:
    app.selection[0].getElements()[0].cells[0].associatedXMLElement
    Result: [object XMLElement]
    So that kind of "chain" works.
    But with the merged cell as only reference, I can't find its associatedXMLElement. Any ideas would be appreciated.
    Best regards,
    Andreas Jansson
    Message was edited by: Andreas Jansson

    In my opinion, locate a cell according to his content is not so effortable. What happens if contents of more than two cells are equals?
    I take xml elements of associated xml element of table and put them into an array.
    This array contains associated xml elements of every cell ordered by cell positions into table.
    Now, locate associated xml element of a cell based on its array position (index) is more reliable:
    var myCell_cell = app.selection[0];
    var myElement = myCell.associateXMLElement
    if (!myElement || !myElement.isValid)  {
         var table =  myCell.parent;
         var xml_tab = table.associatedXMLElement;
         var xml_cells_arr = xml_tab.xmlElements.everyItem().getElements();
         var idx = myCell.index;
         myElement = xml_cells_arr[idx];
    Alex ;-)

  • Smartview 11.1.2.1.103 problem: Merged cell in HFM workspace is unmerged in smartview

    I have an error here in smartview 11.1.2.1.103. In HFM workspace, the form I designed has merged cell in row1. But I open the same form in smartview, row1 is not longer merged. Does anyone have the same problem?
    PS: I've already set the option: excel formatting in smartview.

    Hi,
    thanks for your answers. From all I could find out from Oracle support, I'll have to wait until 11.1.2.1 is GA and then try again :-(
    Or will there be a patch for 11.1.2.0 as well?
    Best regards,
    Markus

  • Table cells - Problem with merged cells

    Hi
    I was experiencing very weird behavior with my tables until I realized that it was caused by merged cells
    My script gives a dialog which allows the user to choose from which column to start and from which row.
    As the script iterates through the cells in the selection I was getting weird results
    Through using .select() function I was able to see that depending on the column, some times row 5 could be which seems to be row 3!
    The reason was because of merged cells in that row
    I.e., when some cells are merged together, only the first column of those merged cells is recognized - the others are not
    so it comes out that when merging cells from column 3 to 5, column 3 has a cell in that row, columns 4 and 5 do not, and column 6 does!
    Is there a way to get around this behavior?
    Thanks
    Davey

    I don't understand the point of your post.
    If you're trying to report a problem or "bug" with Pages, that is not the purpose of this user-to-user forum. You should leave feedback for the Pages team on this page.
    I've not had a problem opening Word files with tables in Pages. If you're saying Word can't handle tables with merged cells, then don't use merged cells in files you are going to export as Word. Word & Pages must handle merged table cells differently, as I know both can do that. As far as RTF, Pages can open & export as RTF. Again, if you are going to export as RTF, don't use tables. Neither of these is a fault of Pages, just limitations of the formats/programs.

  • CS, CS2 & CS3 place problem

    Hi,
    I was just wondering if someone could help me with the following problem:
    All l'm doing is placing a text file into a text frame - sounds easy - test code below:
    ======
    set boxContent to "HDPropane:textfile.txt"
    tell application "Adobe InDesign CS2"
        activate
        set MyDocument to active document
        try
            set myframe to (text frame 1 of MyDocument whose label is "testbox")
            «event K2  plac» (boxContent) with «class rtfo» without «class imot» given «class insh»:myframe
        on error emg
            display dialog emg
        end try
    end tell
    ========
    This works OK and will overwrite the contents each time... the problem is when you link the text frame to another text frame.... it still works fine if you run the script without having any contents in your text frames but as soon as you have some contents you get an error 'import failed'  I get the same problem in CS, CS2 & CS3
    I've even tried after the 'set myframe' adding set myframe contents to "" - adding this line was a little hit and miss  sometimes it worked sometimes l got the same import failed message.
    Regards, Gary.

    Change this:
            set myframe to (text frame 1 of MyDocument whose label is "testbox")
            «event K2  plac» (boxContent) with «class rtfo» without «class imot» given «class insh»:myframe
    to something like this:
            set myframe to (text frame 1 of MyDocument whose label is "testbox")
            set contents of parent story of myFrame to ""
            place file boxContent on myframe without showing options
    Shane Stanley <[email protected]>
    AppleScript Pro Sessions <http://scriptingmatters.com/aspro>

  • Problem batch processing in CS2, CS3 and CS4e

    I have all the above named programs and have tried unsuccessfully to get the batch process to work.  I currently run it in CS with no problems. We want to upgrade to CS5e and actually be able to use it to process our web gifs without constantly going back to the old version.
    I have an action set up with the following steps:
    Start Record
    Open File
    Save for Web - Set Width to 150 pixels - Apply - Save (I select a folder called 150)
    I repeat process for a 300 pixel image.
    Close the file
    Stop record.
    Go to batch process:
    Choose Action
    Select Source Folder
    Override Action "Open" Command is checked
    Choose Destination Folder (150 from above)
    I select OK.
    This runs fine in PS CS and no matter how many files I have in the source I end of with the same number in both the 150 and 300 folder I have created, named correctly and in the correct 150 or 300 pixel width I need as gif files.
    I repeat the same procedure in CS2, CS3 or CS4e and all I get is a folder with one image in it when done.  the batch runs and you can see it opening files but it just constantly overwrites the original file.
    I have tried to check other boxes such as the Override Action Save As Command and other things I have found on these forums but nothing is working.
    I even called Adobe and was on the phone for 99 minutes and let them view my desktop while I ran the procedure in both PS CS and PS CS4e and they were stumped.  I was told they would pass it on to supervisors and someone would call me back.  I called back after a week since I had not heard from anyone and was told my call was recorded as a mis-dircted call and they had no record.
    If someone could please help I would really appreciate it.  I have spent the last three evenings combing websites and watching videos to no avail.
    Thanks in advance.

    Thanks, but I have checked all those and am using the same settings from program to program without success.  It always work
    s in PS CS.

  • Excel Merge Cells.vi throws an undefined error in Excel 2013?

    Basically, I can't write text into an Excel spreadshoot using the Report Generation tools.
    Using LabVIEW 2013 (SP1) I am writing to individual cells in an Excel (2013) template.
    The error is coming from the Report Generation Toolkit>Excel Specific>Excel Easy Text.vi.>Excel Merge Cells.vi.
    Inside of the "Excel Merge Cells.vi" is an "Invoke Node.Range". When the program hits this point, it throws out an undefined error.
    My code has been running on multiple platforms in multiple programs with no problems using Office 2010.
    NASA upgraded our Office Suit to 2013. I am now throwing an undefined error ( -2146827284).
    I've got a service request in and have talked to an engineer. THey are looking at the problem. However, I thought I would throw it out here and see if anyone had seen this particular problem.
    Bryan Alexander

    Problem found, workaround implemented.
    When you use the "New Report.vi", you have to wire in one of four choices for the state of the window. "Maximized", "Minimized", "Normal" and "No Change". If you use the "Excel Easy Text.vi" to insert data into an Excel 2013 Spreadsheet, it will generate an error if you opened the Excel file in "Minimized" mode. The other three states work fine.

  • Manage multiple versions(ID CS,CS2,CS3,CS4) of INDD files Indesign proxy for PC

    Dear scripters,
    I have multiple version of ID installed in my system. I have ID CS,CS2,CS3 and CS4. While I am opening (double click) the ID CS file, automatically the file opening in CS4. For solving this problem I have searched in the forums I found there is a program called INDESIGN PROXY for MAC OSX. It manages the problems well.
    Now I am in the process of developing the application same like that for windows using VB. Here is my observation about Indesign proxy.
    1. While user double clicks the Indesign file the argument is not passing to the Indesign.exe, but the argument passes to the Indesign proxy. Something like this
    "C:\Program Files\Adobe\Adobe InDesign CS4\InDesign.exe" "%1"
    to this
    "C:\Program Files\IDproxy\proxy.exe" "%1"
    2. The proxy exe lists all the version of IDs in a dialog box. If user selects CS2, the proxy exe passes the command argument something like this
    "C:\Program Files\Adobe\Adobe InDesign CS2\InDesign.exe" "%1"
    3. Now the file will open in correct version.
    I am comfort with VB forums and coding but I am struck getting the file path while user double click's the file. I short need to get the file path of "%1" argument.
    I think I am detailed.
    Kindly advice me how can I proceed more?
    Thanks
    regards
    a r u l
    vpublish.net

    I don't think it's a mistake.
    "InDesign CS4 (3.0)"
    means: this is the OM for InDesign 3.0 (i.e., InDesign CS) that is contained in InDesign CS4.
    Wait -- do you mean there might be a difference between "the OM for InDesign 4.0 (i.e., InDesign CS2) that is contained in InDesign CS4" and, say, "OM for InDesign 4.0 (i.e., InDesign CS2) that is contained in InDesign CS5" ?
    Why on earth would anyone need that? I imagine it's not because even with versioning the 'older' scripts may not behave the same -- there must be dozens of mails about versioning not working ... I mean, if Adobe knows what causes older scripts to stop working (because, if I understand you correctly, they retroactively change it in the documentation for older versions), wouldn't it be yet easier to not cause those changes?

  • Is there a way of merging cells (not columns) in a Flex Datagrid?

    Hello everyone!
    I'm new to Flex and I have been searching for a solution to this problem for two days now, so any help would be really appreciated!
    I have a datagrid of, lets say x columns of fixed size, with the ability to add or remove rows dynamically. When adding a row o popup comes up and lets the user determine the positions(order) and widths of the desired cells of the row. So what I want to do is to be able to merge cells of the new Datagrid row appropriately, to satisfy the user's choices. Thats the general idea.
    Is there a way to have a Datagrid (or other similar component) with different cell number and widths for each row in Flex? I need a component similar to the Datagrid because I want to be able to select rows and process their data.
    Any idea would be very helpful as I'm pressed for time and I could use someone's experience to search in the right direction and not loose time.
    Thanks in advance!

    Thank you very much for your response. I finally did what I wanted without using a Datagrid. I used a Table Flex Component (which extends Flex Grid) that I found here:
    http://code.google.com/p/flex-table/#Demo
    I downloaded the source and changed some things to make it work as I need.

  • I would like to understand how merging cells works

    I am trying to reduce nine fields, into three, but can't understand how merging cells works. Because sometimes it will allow me to merge cells, and at other times the word merge is greyed out
    Regards Lee

    The User Guide, which you can download using the link in the Help menu, explains merging cells pretty clearly.
    I suspect the relevant line to your problem is:
    "The group of cells you choose must form a rectangle, and they must be all body cells, all header cells, or all footer cells."
    The merge option is probably greyed out because your selection includes both header and body cells.
    I think there is a general feeling among users that merging cells should be avoided because it breaks some operations like sorting tables.

  • Equivalent to SpreadSheet? (I need to merge cells)

    Hey all,
    I'm making a program dealing with scheduling.
    Now i need something that works as a Spreadsheet.
    a lot of you may say 2 use JTable,
    but there's a problem with that idea, i can't merge cells.
    For example
    The Columns are days of the week, Rows are Activities
    i have an activity that is 3 days long,
    i want that activity/cell to be 3 cells long( like in excel when you merge cells).
    any ideas on how i can achieve this? or alternative ideas?
    any help will be greatly appreciated.
    avdzm
    Message was edited by:
    avdzm

    Hi,
    Browse though excellent blog at
    http://www.jroller.com/page/santhosh
    Excellent leads n discussion there.
    Cheers
    Ravi

  • Help with 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 --
    only one graphic per cell. I make my jpg the size of my cell, which
    it seems to fill. Then, when I upload it to view in browser, it
    looks as though the graphic doesn't take up the entire cell. At one
    point, it was working both in Dreamweaver and the browser. Now, in
    the browser view, it looks as though there is extra space above the
    graphic and below it. Any suggestions on what is going on???

    It's not the use of tables with your graphics that is
    necessarily the
    problem, it's HOW you are using the tables with your
    graphics. Can we see
    the page you have built so we can examine the code?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "degazon" <[email protected]> wrote in
    message
    news:gasr2p$10m$[email protected]..
    > Thanks! It's now evident that I shouldn't use tables
    with the graphics.

  • Merge Cells in a blank table

    Can anyone tell me how to merge cells in a blank table. For example - while making the table I may need 3 column in one row and only 2 in the next row. So I merge the cells. I have a laptop and am taking my right index finger and directing the mouse to the cell and then moving and tapping on the adjacent cell with my left index - but I must be doing something wrong because 9 out of 10 times it doesn’t work and I can’t figure out what I’m doing wrong. I’m pulling my hair out.
    THANK YOU

    Zaby,
    You might find it easier to select one cell and then Shift-Arrow to extend the selection.
    I assume that you are just making some kind of form and won't ever want to sort the table. Merging and Splitting cells can gum up the works for subsequent operations, so think before you choose that solution to your formatting problem.
    Jerry

  • Merge cells in table (RTF template)

    Hey, everybody! Is it possible to merge cells at runtime on some condition?
    Edited by: user11367404 on 24.08.2009 6:10

    Hi,Rumzes, have you resolved your problem ? Could you tell me how to merge cells ? Thanx

  • How to hide rows with merged cells?

    I would like to know how to hide rows on numbers with merged cells, could do it normally at excel but I am not being able to do it at Numbers.
    thanks!

    Felipe,
    To hide a row with Merged Cells, Un-Merge first, then Hide. Select the Merged Cells and Table > Unmerge.
    Note that this is only a problem with vertically merged cells when you want to Hide a Row.
    If you want to Hide a Column, you can't have a Horizontal Merge that involves that Column.
    Jerry

Maybe you are looking for

  • SQL Injection Ver 2

    Hello I've just installed HTMLDB ver 2 into a new install of 10.2.0.1.0 (taken off OTN)and wanted to have a look at generating reports mentioned in the documentation using SQL Injection. When I click on SQL Injection I get the following message: "SQL

  • Summary list of counts

    I'm trying to display a summary count of distinct values in a table based on their group category in a lookup table. The query for the summary page looks like this... SELECT rfs_category, lookup_value_desc, COUNT (*) the_count FROM seeker_rfs LEFT OU

  • Trying to download music but getting error asking to ste date and accept cookies. But all is ok with date and cookies

    When I try to download music on my mac, getting error and it's telling me to set date and to make dure cookies are on and apple cookies are allowed. Date is set right and my cookies are on and set to allow apple etc.  No previous problems downloading

  • How to display client date in oracle

    Hi All, How to display client system date in oracle. When I try to display date & time oracle displays server date and time but I need to display client date & time. How can I achieve that? Thank you

  • Additional Partner Report

    I have created one additional partner function in Architect in a diiferent account group. Now when i am creating Inquiry/order i am adding this into my partner function. My requirement is how i will get a report on the basis of this new partner funct