TableStart/TableEnd options?

Hi, just asking if there’s a way to specify the maximum # of rows to be displayed when using the TableStart/TableEnd in MS Word? Also, reverse the ordering of the rows? As much as possible, I want it handled in MS Word rather than on the program. Just asking.

Thanks.

Hi

Thanks for your request. No, there is no way to specify maximum number of rows in the table. Also, as I know there is no way to achieve the same in MS Word as well.
What do you mean “reverse the ordering of the rows”? Do you mean some kind of sorting? As I know, MS Word does not provide such feature.
Best regards.

Thanks. I was just hoping there is such a feature, however, i understand it’s not possible right now. Re “reverse the ordering of the rows”, i was hoping that MS Word can handle inversion of rows like

row1
row2
row3
row4

will show up as

row4
row3
row2
row1

thanks for the info.

Hi

Thank you for additional information. You can try using the following code to reverse the ordering of the rows:

// Open document.
Document doc = new Document(@"Test001\in.doc");
// Get table.
Table table = doc.FirstSection.Body.Tables[0];
// Reverse order of rows in the table.
for (int i = 0; i <table.Rows.Count - 1; i++)
    table.Rows.Insert(i, table.LastRow);
// Save output document.
doc.Save(@"Test001\out.doc");

Hope this helps.
Best regards.

thanks for the code, however, i’d rather handle it on my SQL statements. I was just hoping that, maybe, there’s an option on the TableStart tag that can be added to handle those 2. It would have been nice. I understand it’s not possible, though. Merry Christmas!!!