saving in database from word document

Posted by Deepakji under C# on 2/5/2012 | Points: 10 | Views : 1349 | Status : [Member] | Replies : 1

i am working on how to save content of doc file into database.

the doc file consist of questions in this format.

1. what is your name
a)hello b) sir c)you d)hi
2. what is your father name
a)hello b) sir c)you d)hi

these are available in word doc now how should i split them and save in database the columns in database are

so i am not getting how to split them and save it

the result in database should be (1, what is your name,hello,sir,you,hi)

so please let me know the code as its urgent please thank you,


Posted by: Pradeepkumar417 on: 2/5/2012 [Member] Starter | Points: 25


You can split like below.

string str = "1. what is your name a)hello b) sir c)you d)hi ";
string[] str1 = new string[] { ".","a)","b)","c)","d)" };
string[] str2 = new string[2];
str2 = str.Split(str1, StringSplitOptions.None);

Thanks & Regards,
Software Engineer,
Pradeep Kumar

Deepakji, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response