如何从字节数组加载 Word 文档 [英] How to load Word document from byte array

查看:22
本文介绍了如何从字节数组加载 Word 文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将整个 MS Word 文件本身保存到一个字节数组中.我想以我在文件系统上的方式加载它,但最少使用 Microsoft.Office.Interop.Word,因为它非常慢当它获得 .Open(args[]) 部分时.

I have the whole MS Word file itself saved into a byte array.A want to load it the way I would if it was on file system but with the minimal use of Microsoft.Office.Interop.Word because it is very slow when it gets the the .Open(args[]) part.

推荐答案

试试这个....

      byte[] bte = File.ReadAllBytes("E:\test.doc"); // Put the Reading file
        File.WriteAllBytes(@"E:\test1.doc", bte); // Same contents you will get in byte[] and that will be save here 

这篇关于如何从字节数组加载 Word 文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆