Save stream bug?


#1

I am not able to save to memory stream. Its always 0 length. Instead of stream if I save to file it works. This is my code. I am using v3.7.2.0

… some excel operation …
System.IO.MemoryStream stream = new System.IO.MemoryStream();
excel.Save(stream, Aspose.Cells.FileFormatType.Default);

Am I missing something?


#2

Could you try this piece of code and see what happens?

Excel excel = new Excel();

excel.Worksheets[0].Cells["b1"].PutValue(123);

MemoryStream ms = new MemoryStream();
excel.Save(ms, FileFormatType.Default);

FileStream fs = new FileStream("d:\\test\\stream2.xls", FileMode.OpenOrCreate, FileAccess.ReadWrite);

ms.WriteTo(fs);

fs.Close();

Attached is the latest version.