You can iterate the records inside the DataTable and write them to TableCell objects. I prepared a simple example to better illustrate how this can be implemented and you can find it attached to this reply. In the code, a RadFlowDocument is created and the Table and is inserted using RadFlowDocumentEditor. The generated content is then exported to DOCX using DocxFormatProvider.
Hope this is helpful.
Regards,
Tanya
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers.Learn More.
Your sample works great, but how do I change code to use Built-In Word Document table design? (Ex: Grid Table 4 - Accent 1)
Thank you,
Sam
0
Tanya
Telerik team
answered on 30 May 2019, 02:11 PM
Hi Sam,
Thank you for the feedback, I am happy to hear that the sample was helpful.
The Grid Table styles in MS Word are conditional table styles. This concept is currently not supported in RadWordsProcessing and we have logged a task to implement it: WordsProcessing: Conditional Table Styles. You can vote for the task to increase its priority and subscribe to receive updates about status changes on it.
Please, let me know if you have any additional questions.
Regards,
Tanya
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers.Learn More.