What's the fastest way to read a .docx file line-by-line in c# RRS feed

  • Question

  • Hello there,

    After upload I want to read a .docx file line by line.

    This is my file.docx and is divided for chapters and paragraphs of the chapter

    The structure of file.docx

    Chapter 1 - Events
    alert or disservices
    significant activities
    Chapter 2 – Safety near miss security checks
    Chapter 3 – Training environment upkeep

    I need read a .docx file line by line and according to the chapter I have to insert chapter and content of the paragraph in the corresponding database table


    Chapter 1 - Events
     - alert or disservices
    Lorem ipsum dolor sit amet, consectetur adipiscing elit ….
    …. ….
    …. ….
    - significant activities
    Phasellus dui nunc, rutrum vitae dictum eleifend, ullamcorper hendrerit sem ….
    …. ….
    …. ….

    must be inserted in the table Events

    -- ----------------------------
    -- Table structure for events
    -- ----------------------------
    DROP TABLE IF EXISTS `events`;
    CREATE TABLE `events` (
      `sID` int(11) NOT NULL AUTO_INCREMENT,
      `alert_or_disservices` longtext,
      `significant_activities` longtext,
      PRIMARY KEY (`sID`)

    I wanted how to do it as efficiently as possible within the .NET C# OpenXML scope of things.

    Do you have any example of OpenXML for my case?

    Please can you help me?

    Thanks in advance for any help or suggestion



    • Edited by cms9651 Tuesday, September 15, 2020 7:05 PM
    Tuesday, September 15, 2020 7:04 PM