Quantcast
Channel: Open XML Format SDK forum
Viewing all articles
Browse latest Browse all 1288

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

$
0
0

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

e.g.

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`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

Sincerely

Chevy



Viewing all articles
Browse latest Browse all 1288

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>