两个word的什么区别呢
C#中 StreamWriter sw=new StreamWriter(@"D:\My Documents\regexpractice.doc");
sw.WriteLine("c# 数据库连接 ");
sw.WriteLine("清空页面上的所有TextBox中的文本 ");
sw.Flush();
sw.Close();
StreamReader sr = new StreamReader(@"D:\My Documents\regexpractice.doc", Encoding.UTF8);
Console.WriteLine(sr.ReadToEnd());
上面语句生成的word用c#读取是没有问题的,但是读取其他的用office创建的word时,总会是报错。
这两个word有什么区别?怎样才能读取后者?请大家指点下!!