简体   繁体   中英

Save an Open Excel WorkBook to Byte[]

I have an open Exel workbook. One way to get Byte[] from it would be to 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?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM