We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Table properties set by Aspose.Words overwritten by table style

I am generating Word docs (.docx) from a Word template (.dotx). The Word template has a default table style in which the “Allow row to break across pages” option has been deselected. However, on certain rows, I want “Allow row to break across pages” to be enabled. If I enable this option on a row in the Word template, when I use Aspose.Words to save a .docx from it, the Allow row to break across pages option is no longer enabled (checked) for that row. Even if I explicitly set the property using Row.RowFormat.AllowBreakAcrossPages = true, it doesn’t seem to “stick” on the .docx saved from the template. It seems that this property is overwritten by the table style when the .docx is saved.

If I modify the table style so Allow row to break across pages is selected, I can then enable/disable the option on specific rows and those settings seem to “stick” on the .docx generated from the template. So I can do this as a workaround, but ideally, I’d prefer not to have to modify the table style and be able to adjust the properties using the Aspose.Words API.

Is this expected behavior? Is there any other way to handle this? Thanks much.

Hi Dexter,

Thanks for your inquiry. It would be great if you please share following detail for investigation purposes.

  • Please attach your input Word documents.
  • Please create a standalone/runnable simple application (for example a Console Application Project) that demonstrates the code (Aspose.Words code) you used to generate your output document
  • Please attach the output Word file that shows the undesired behavior.
  • Please attach your target Word document showing the desired behavior. You can use Microsoft Word to create your target Word document. I will investigate as to how you are expecting your final document be generated like.

Unfortunately, it is difficult to say what the problem is without the Document(s) and simplified application. We need your Document(s) and simple project to reproduce the problem. As soon as you get these pieces of information to us we’ll start our investigation into your issue.

I have attached the requested files. Thanks for looking into this.

Hi Dexter,

Thanks for sharing the detail.

I have tested the scenario and have managed to reproduce the same issues at my side. For the sake of correction, I have logged these problems in our issue tracking system as follow:

WORDSNET-9806 : 'Allow row to break across pages' value is changed after re-saving the document
WORDSNET-9807 : RowFormat.AllowBreakAcrossPages property does not work for dotx

I have linked this forum thread to the same issues and you will be notified via this forum thread once these issue are resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-9806;WORDSNET-9807) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.