We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Error while using SavetoStream in Aspose.cells for .Net

Hi,

workbook.SaveToStream() is not working properly. when i convert it to the byte[] only 0 are getting stored in the byte[]. Please find the attached screensshot for more details.

I need some solutions as soon as possible because we are in SIT phase.

using Aspose.cells for .Net 4.8.0.0

Thanks!

Hi,

Kindly change your code to:

e.g



MemoryStream sFileSave = wbb.SaveToStream();

sFileSave.Seek(0, SeekOrigin.Begin);

byte[] bSave = new byte[sFileSave.Length];

sFileSave.Read(bSave, 0, (int)sFileSave.Length);

sFileSave.Close();



Thank you.