Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I was uploaded the doc file to data base as binary data,

now i want to read the text from the binary data, edit and save to database again.

How to achieve this,

please suggest.

What I have tried:

MemoryStream mm = new MemoryStream((byte[])["Column Name"]);
string htmlWebPageRow = Encoding.GetEncoding(65001).GetString(mm.ToArray());
Editor1.Text = htmlWebPageRow.ToString().Trim();
Posted
Updated 12-Jul-16 21:26pm

1 solution

You can't convert a .doc file directly to string.
However you make use of one of the following library to read text data from a .doc file
1. Welcome to the Open XML SDK 2.0 for Microsoft Office[^]
2. C# .NET Word Document Processing API for DOC DOCX RTF HTML PDF EPUB[^]

Hope, it helps :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900