Free Support Forum - aspose.com

Excel.Save problem with Pictures

Hi,

I have a problem invoking the following, when adding pictures into the sheet through a stream.

excel.Save(“file.xls”, Excel.SaveType.OpenInExcel, Excel.FileFormatType.Excel97, Response);

This works fine, when I use the path of the image.

But when using a stream, the following error messages appear:
Exception Details: System.ArgumentNullException: String reference not set to an instance of a String. Parameter name: s
[ArgumentNullException: String reference not set to an instance of a String.
Parameter name: s]
System.Text.UnicodeEncoding.GetBytes(String s) +112
Aspose.Excel.Worksheet.a(Picture A_0)
Aspose.Excel.Record.a8.a(Worksheet A_0, Int32 A_1, Int32 A_2, Int32 A_3, Int32 A_4, Int32 A_5)
Aspose.Excel.Worksheet.c(bm A_0)
Aspose.Excel.Worksheets.d(bm A_0)
Aspose.Excel.Worksheets.a(String A_0, SaveType A_1, FileFormatType A_2, HttpResponse A_3)

[Exception: Errors in Excel Save method]
Aspose.Excel.Worksheets.a(UInt32 A_0, Exception A_1)
Aspose.Excel.Worksheets.a(String A_0, SaveType A_1, FileFormatType A_2, HttpResponse A_3)
Aspose.Excel.Excel.Save(String resultSpreadsheet, SaveType saveType, FileFormatType fileFormatType, HttpResponse response)

Any hints, what I’m doing wrong?
Regards,
Michael

Hi Michael,

Sorry for any inconvenience. Please try the latest hotfix.

Hi Laurence,

it works with the latest hotfix. Thanks.

Michael