This is a migrated thread and some comments may be shown as answers.

newbie to RadWordsProcessing

3 Answers 34 Views
WordsProcessing
This is a migrated thread and some comments may be shown as answers.
Sam
Top achievements
Rank 1
Sam asked on 24 May 2019, 07:33 PM

Hello,

I am trying to create Word document from scratch.  I prepared a asp.net webforms application and got a System DataTable 

How do I insert a table from a datatable using Telerik RadWordsProcessing?

Thank you

3 Answers, 1 is accepted

Sort by
0
Tanya
Telerik team
answered on 29 May 2019, 01:13 PM
Hi Sam,

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.
0
Sam
Top achievements
Rank 1
answered on 29 May 2019, 04:11 PM

Hi Tanya,

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.
Tags
WordsProcessing
Asked by
Sam
Top achievements
Rank 1
Answers by
Tanya
Telerik team
Sam
Top achievements
Rank 1
Share this question
or