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

Free Support Forum - aspose.com

Table:Start and Table:End in a table limiting to show only 20 rows

Hi there

Iam having a problem in displaying the mail merge fields table with table:start and table:end tags.

The table is displaying for only 20 rows, if the rows exceeds than 20 rows, the word document is throwing an error as corrupted word document in browser.

I need help to rectify this situation.

Regards

Hi Jagadeesh,

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


  • Please attach your input Word document.
  • 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.

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.


Hi Tahir

Please find my template attached to this post.

Iam having problems when the table data is more than 20 rows. when the word document is displayed in browser it is showing an error as document corrupted. When I have less than 20 rows, it shows perfectly.

Is there any known limitations for using tablestart and tableened tags. Do I require any settings in word document when the table data flows on more than 1 page.


Thanks & regards

Jag.

Hi Jagadeesh,

Thanks for sharing the document.

ishwar39:

I am having
problems when the table data is more than 20 rows.

I have tested the scenario using latest version of Aspose.Words for .NET 14.8.0 and have not found any issue with output document. I have created a temporary DataTable with 100 rows and perform the mail merge operation without any issue. See the following code example.


Document doc = new Document(MyDir

  • “internalpaymentrequestform.docx”);

DataTable table = new DataTable("IPRStudents");

table.Columns.Add("Col1");

for (int i = 0; i < 100; i++)

{

DataRow row = table.NewRow();

row[0] = "Test";

table.Rows.Add(row);

}

doc.MailMerge.ExecuteWithRegions(table);

doc.Save(MyDir + "Out.docx");


ishwar39:

when the word document is displayed in browser it is showing an error as document corrupted. When I have less than 20 rows, it shows perfectly.

Could you please elaborate your scenario how you are showing your output document in browser?
ishwar39:

Is there any known limitations for using tablestart and tableened tags. Do I require any settings in word document when the table data flows on more than 1 page.

There is no such limitations for mail merge with regions. I suggest you please read following documentation link for your kind reference.
http://www.aspose.com/docs/display/wordsnet/Mail+Merge+with+Regions+Explained


<!–[if gte mso 9]>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:DoNotShowPropertyChanges/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>AR-SA</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val=“Cambria Math”/>
<m:brkBin m:val=“before”/>
<m:brkBinSub m:val="–"/>
<m:smallFrac m:val=“off”/>
<m:dispDef/>
<m:lMargin m:val=“0”/>
<m:rMargin m:val=“0”/>
<m:defJc m:val=“centerGroup”/>
<m:wrapIndent m:val=“1440”/>
<m:intLim m:val=“subSup”/>
<m:naryLim m:val=“undOvr”/>
</m:mathPr></w:WordDocument>
<![endif]–><!–[if gte mso 10]> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;}

<![endif]–>