CellFormat.getVerticalMerge and getHorizontalMerge ignores cell property information

There appears to be an issue with the getHorizontalMerge and getVerticalMerge function provided by the CellFormat object. When reading a MSWord document where the table cells have been merged using Word these functions are always set to zero. Aspose Word code is in error.

Please don’t come back and give me your standard message that Microsoft has designed rows and cells to be independent. I know that and this is the message first message that appears on every form notification about this issue.

Background:

The Row1-Cell1 and Row1-Cell2 are merge together with text in both cells. This is important because of the way Microsoft handle merges. In Row2-Cell1 and Row2-Cell2 are merged without text in Cell2. Also, Row2-Cell3 is merged with Row3-Cell3 to create a vertical merge. Again Row2-Cell3 and Row3-Cell3 have text.

See Table 1 Target Table in attached document

The following is the output for Microsoft Word 2016 for the merged cells in Row1.

See Table 2 Word Definition of Horizontal Merge In attache document

Aspose is ignoring “gridSpan” properties defined in “tcPr” statement which precedes the textIds 77777777 and 16963CA6. Ignoring the cell properties should not be happening. This is part of the Microsoft WordProcessingML and OfficeXML.

Lets take a look at the vertical merge in Row2-Cell3. There two you are ignoring part of the Microsoft specifications. The following Microsoft’s definition of a horizontal merge.

See Table 3 Word Definition of Vertical Merge in attached document

Previously, I noted that the Row3-Cell3 contained text. The previous definition of a horizontal merge is from Row2-Coll3 and contains information for Row3-Col3.

Within Aspose.Word, how do I get to the merge information?

I have used your example 1 from Merge Table Cells in in Java|Aspose.Words for Java to prove that the Horizontal and Vertical values returned are not correct when reading a Microsoft Word 2016 document.

MergeCellsTest.zip (12.4 KB)

Ok, I have additional work and found that given the examples Aspose has provided I have been able to calculate the horizontal cell merges but it would be so much easier if you just followed your and Microsoft’s specs. There is a big problem with the method created by my CODE HACK. The HACK will only work if on rows where all cells are the same size. You have to have a better way? HOW?

See Table 1 Target Table in attached file MergeCellsTest_P2.docx

Also, I have not been able to find a way to determine vertical merges. There appears to be a big issue here. How can I determine a Vertical Merge using the Aspose API? At this point I don’t see a solution to this problem.

In Table 1 Target Table Row2-Col3 has a Vertical Merge to Row3-Col3. Take a look at Table 2 Horizontal Merge Detection at rows 7 and 12. The text “Row 3 Col 3” should be part of Row 7. This appears to be a bug in the Aspose API.

Take a look at the cell properties node that is just before the merge in Row2-Cell3. There you will find the Cell Properties element that is part of the Microsoft WordProcessingML and OfficeXML specifications.

See Table 2 Horizontal Merge Detection in attached file MergeCellsTest_P2.docx

As part of this upload I have included the source code to reproduce this issue.

TableMergeTest.java is a modified implantation of Aspose Example 1 code from Merge Table Cells in in Java|Aspose.Words for Java

Utils.java is a modified version of Aspose utils.java source code. I have modified it to fit my testing directory structure.

MergeCellsTest_P2.docx – Is the complete text of the email including tables.

MergeCellsTest_P2.zip (13.8 KB)

@hoppyjr,

We have logged your requirement/problem in our issue tracking system. Your ticket number is WORDSNET-17596. We will further look into the details of this scenario and will keep you updated on the status of the linked issue.

Thank you for your help.

I am continuing the evaluation but this issue is holding up my employee purchase of Aspose.Total.

@hoppyjr,

We are currently doing analysis of this issue. We will inform you via this thread as soon as this issue is resolved. We apologize for your inconvenience.

Hello,
I hate to keep pushing, we like everyone else have deadlines, my boss is getting a little apprehensive. It has been 11 days and know response on issue WORDSNET-17596. Any updates?
When and/or/if this happens again how long will it talk to resolved with paid support?
Is there a way to purchase the source code?

Thanks

@hoppyjr,

Unfortunately, your issue is not resolved yet and there is no further news about it. We will inform you via this thread as soon as this issue is resolved or any estimates are available. I am afraid, you cannot purchase source code of Aspose.Words API either. We apologize for your inconvenience.

If this issue (WORDSNET-17596) is important to you, and for the fast resolution of this issue, please have a look at the paid support options - e.g. purchasing ‘Paid Support’ will allow you to post your issues in our Paid Support Helpdesk and raise the priority of this issue. Many ‘Paid Support’ customers find that this leads to their issues being fixed in the next release of the software.

If you would like to take advantage of the ‘Paid Support’ then please request a quote in our purchase forum - Aspose.Purchase - Free Support Forum - aspose.com

Just wanted to give you and the development team an update (WORDSNET-17596). I have been able to extract the horizontal and vertical merge information from a Word table using Apache’s POI library. The plan at this time is to extract metadata information using POI for all of Aspose short comings in a post processing mode. When Aspose has bug fixed available we will remove the post processing and begin using Aspose.

Keep in mind this is still a HACK.

Note:: according to the forum this has been an issue since 2014 and maybe longer.

@hoppyjr,

Thanks for the additional information. We have logged these details in our issue tracking system. We will keep you posted on any further updates.

Is there any addition information on this error? It was posted Oct 18 and the last interaction with Aspose was in Nov 2018. Progress??

@hoppyjr,

Unfortunately, this issue is not resolved yet. We are investigating the best possible way to fix this issue. We will inform you via this thread as soon as this issue is resolved. We apologize for your inconvenience.

@hoppyjr,

We have good news for you i.e. WORDSNET-17596 has now been resolved. The fix of this issue will be included in the 19.7 (next version) of Aspose.Words. We will inform you via this thread as soon as the next version containing the fix of your issue will be released at the start of next month. You should also use Table.ConvertToHorizontallyMergedCells() method to transform table into desired format.

A post was split to a new topic: Convert my account to a paid account

The issues you have found earlier (filed as WORDSNET-17596) have been fixed in this Aspose.Words for .NET 19.7 update and this Aspose.Words for Java 19.7 update.

A post was split to a new topic: Convert To Horizontally Merged Cells method feature of Aspose.Words