Hello, we need to save a workbook into a stream. If we use the save method with stream param, the stream data size is always ~4KB? If we use the save methode with param FileName then it works as expected. It doesn't work within stream.
Workbook workbook = new Workbook();
fstream = new FileStream(@"C:\Temp\origin.xls", FileMode.Open);
MemoryStream stream = new MemoryStream();
workbook.Save(@"C:\Temp\generated\test.xls", FileFormatType.Excel2003); // Works! It creates a new file (copy of origin.xls)
byte buffer = new byte[(int)stream.Length];
buffer = stream.ToArray();
File.WriteAllBytes(@"C:\Temp\generated\FromStream.xls", buffer); // 4KB??? Doesn't work!
Please check your save method with stream .
Thanks in advance.