Click here to Skip to main content
15,509,982 members
Home / Discussions / C#
   

C#

 
AnswerRe: Better way to handle 50 labels Pin
BillWoodruff22-Sep-20 8:59
mveBillWoodruff22-Sep-20 8:59 
AnswerRe: Better way to handle 50 labels Pin
Mycroft Holmes22-Sep-20 13:20
professionalMycroft Holmes22-Sep-20 13:20 
GeneralRe: Better way to handle 50 labels Pin
Member 149437371-Oct-20 19:52
Member 149437371-Oct-20 19:52 
AnswerRe: Better way to handle 50 labels Pin
Member 1494373728-Sep-20 14:41
Member 1494373728-Sep-20 14:41 
QuestionComplex View Model with Nested class Properties / Array Submit Pin
Guillermo Perez18-Sep-20 16:50
Guillermo Perez18-Sep-20 16:50 
GeneralRe: Complex View Model with Nested class Properties / Array Submit Pin
Richard MacCutchan18-Sep-20 22:47
mveRichard MacCutchan18-Sep-20 22:47 
AnswerRe: Complex View Model with Nested class Properties / Array Submit Pin
Gerry Schmitz19-Sep-20 3:43
mveGerry Schmitz19-Sep-20 3:43 
QuestionInsert on database contents of word file using OpenXML and c# Pin
cms965118-Sep-20 9:40
cms965118-Sep-20 9:40 
Hello, I need your help.

I want to read a .docx file line by line and insert chapters and paragraphs of the chapter in database table.

I have tried using Microsoft.Office.Interop.Word to read the document, without success because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.

Now I read on google that the suitable tool for this is OpenXML.

My file.docx 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 insert on database table according with this schema

https://i.stack.imgur.com/41YQL.png[^]

How to do resolve this?

Thanks in advance for any help or suggestion

Chevy

C#
DROP TABLE IF EXISTS `chapters`;
CREATE TABLE `chapters` (
  `chapter` longtext CHARACTER SET utf8 COLLATE utf8_general_ci,
  `subheading` longtext CHARACTER SET utf8 COLLATE utf8_general_ci,
  `contents` longtext CHARACTER SET utf8 COLLATE utf8_general_ci,
  `sID` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`sID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

AnswerRe: Insert on database contents of word file using OpenXML and c# Pin
Gerry Schmitz18-Sep-20 10:36
mveGerry Schmitz18-Sep-20 10:36 
GeneralRe: Insert on database contents of word file using OpenXML and c# Pin
cms965118-Sep-20 10:52
cms965118-Sep-20 10:52 
GeneralRe: Insert on database contents of word file using OpenXML and c# Pin
Gerry Schmitz18-Sep-20 12:18
mveGerry Schmitz18-Sep-20 12:18 
GeneralRe: Insert on database contents of word file using OpenXML and c# Pin
cms965118-Sep-20 21:13
cms965118-Sep-20 21:13 
GeneralRe: Insert on database contents of word file using OpenXML and c# Pin
Dave Kreskowiak18-Sep-20 19:45
mveDave Kreskowiak18-Sep-20 19:45 
GeneralRe: Insert on database contents of word file using OpenXML and c# Pin
cms965118-Sep-20 21:11
cms965118-Sep-20 21:11 
GeneralRe: Insert on database contents of word file using OpenXML and c# Pin
Pete O'Hanlon19-Sep-20 0:10
mvaPete O'Hanlon19-Sep-20 0:10 
GeneralRe: Insert on database contents of word file using OpenXML and c# Pin
Gerry Schmitz19-Sep-20 3:17
mveGerry Schmitz19-Sep-20 3:17 
QuestionThe forms are cut for me using high resolution on WinForm Pin
goldsoft18-Sep-20 2:51
goldsoft18-Sep-20 2:51 
AnswerRe: The forms are cut for me using high resolution on WinForm Pin
Gerry Schmitz18-Sep-20 8:39
mveGerry Schmitz18-Sep-20 8:39 
GeneralRe: The forms are cut for me using high resolution on WinForm Pin
goldsoft18-Sep-20 10:57
goldsoft18-Sep-20 10:57 
GeneralRe: The forms are cut for me using high resolution on WinForm Pin
Gerry Schmitz18-Sep-20 12:21
mveGerry Schmitz18-Sep-20 12:21 
RantRe: The forms are cut for me using high resolution on WinForm Pin
DerekT-P18-Sep-20 11:48
professionalDerekT-P18-Sep-20 11:48 
AnswerRe: The forms are cut for me using high resolution on WinForm Pin
BillWoodruff19-Sep-20 10:11
mveBillWoodruff19-Sep-20 10:11 
GeneralRe: The forms are cut for me using high resolution on WinForm Pin
goldsoft19-Sep-20 10:54
goldsoft19-Sep-20 10:54 
AnswerRe: The forms are cut for me using high resolution on WinForm Pin
BillWoodruff19-Sep-20 15:20
mveBillWoodruff19-Sep-20 15:20 
QuestionWhat "is" c#`s Double.NaN? Pin
GerVenson16-Sep-20 11:53
professionalGerVenson16-Sep-20 11:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.