Click here to Skip to main content
15,901,373 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I need to read .odt file document content into string can anyone please help me to how to do this in asp.net.

Thank you.

What I have tried:

I tried this but it not working
protected void btnread_Click(object sender, EventArgs e)
{
string text;
using (var streamReader = new StreamReader(@"E:\demo.odt", System.Text.Encoding.UTF8))
{
textbox1.Text = streamReader.ReadToEnd();

}


here textbox1 is the multi line type mode. here it read but it shows the symbols insted of data can any one help me out.
thank you.
Posted
Updated 10-May-16 21:27pm
v3
Comments
Sergey Alexandrovich Kryukov 11-May-16 3:24am    
Reading it into a string is totally pointless.
—SA

1 solution

And ODT file is a binary file containing several XML files compressed into one...So it can not interpreted as text...
 
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