Save an Open Excel WorkBook to Byte[]
I have an open Exel workbook. One way to get Byte[] from it would be to 开发者_StackOverflow社区save File using App.ActiveWorkbook.SaveAs (@temppath,..) and then read file to Byte[] from that path. But is there a way to read open workbook to Byte[]. I am using C#.
This basically resolves to the question of how to get the workbook into a stream without saving it to disk first. See: How to write an Excel workbook to a MemoryStream in .NET?
精彩评论