Open Excel Document from Stream
I am getting my excel docs as a byte[] (blobs) and rather than write it out to disk, then open it I was looking for a way to open straight from the stream. Googling brought me several results like http://msdn.microsoft.com/en-us/library/office/ff478410(v=office.14).aspx which is proper as we have office 2010 installed on target machines.
First thing I do is go to add a reference to DocumentFormat and it is not listed? Do I have to browse to the binary to add it?
But seriously Msoft only provides an open method that takes a string path?? I have got to be doing something wrong because it makes no sense that they would not have at LEAST an overload for a stream???
Here is my code and all I see is one Open option that takes a string path??
if(!initialized)
Init();
workbooks =application.Workbooks;
workbook = workbooks.Open("string file path");
So really I am not interested in DocumentFormat unless I have to do it that way. What I want to do is open from stream without writing to disk...unless I really have to??
链接地址: http://www.djcxy.com/p/75442.html上一篇: VBA对象模型参考文档
下一篇: 从流中打开Excel文档