newbie to RadWordsProcessing

4 posts, 0 answers
  1. Sam
    Sam avatar
    6 posts
    Member since:
    Oct 2013

    Posted 24 May 2019 Link to this post

    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

  2. Tanya
    Admin
    Tanya avatar
    876 posts

    Posted 29 May 2019 Link to this post

    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.
  3. Sam
    Sam avatar
    6 posts
    Member since:
    Oct 2013

    Posted 29 May 2019 in reply to Tanya Link to this post

    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

  4. Tanya
    Admin
    Tanya avatar
    876 posts

    Posted 30 May 2019 Link to this post

    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.
Back to Top