如何将.odt文件读入ASP.NET中的字符串 [英] How can I read .odt file into a string in ASP.NET
问题描述
我需要将.odt文件文档内容读入字符串中,任何人都可以帮助我在asp.net中如何做到这一点。
谢谢。
我尝试了什么:
我试过这个但是没有用br />
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();
}
这里textbox1是多线型模式。在这里阅读,但它显示数据的符号可以任何人帮助我。
谢谢。
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.
推荐答案
和ODT文件是一个包含多个压缩成一个XML文件的二进制文件...所以它不能解释为文本......
And ODT file is a binary file containing several XML files compressed into one...So it can not interpreted as text...
这篇关于如何将.odt文件读入ASP.NET中的字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!