System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+.
at System.Drawing.Image.Save(Stream stream, ImageCodecInfo encoder, EncoderParameters encoderParams)
at System.Drawing.Image.Save(Stream stream, ImageFormat format)
at Syncfusion.XlsIO.Parser.Biff_Records.MsoDrawing.MsoBitmapPicture.EvaluateHash()
at Syncfusion.XlsIO.Parser.Biff_Records.MsoDrawing.MsoBitmapPicture.set_Picture(Image value)
at Syncfusion.XlsIO.Implementation.WorkbookShapeDataImpl.AddPicture(Image image, ExcelImageFormat imageFormat, String strPictureName)
at Syncfusion.XlsIO.Implementation.Shapes.BitmapShapeImpl.set_Picture(Image value)
at Syncfusion.XlsIO.Implementation.XmlReaders.Excel2007Parser.ParseBlipTag(XmlReader reader, BitmapShapeImpl shape, RelationCollection relations, String strParentPath, FileDataHolder holder, List`1 lstRelationIds, Dictionary`2 dictItemsToRemove)
at Syncfusion.XlsIO.Implementation.XmlReaders.Excel2007Parser.ParseBlipFill(XmlReader reader, BitmapShapeImpl shape, RelationCollection relations, String parentPath, FileDataHolder holder, List`1 lstRelationIds, Dictionary`2 dictItemsToRemove)
at Syncfusion.XlsIO.Implementation.XmlReaders.Excel2007Parser.ParsePicture(XmlReader reader, WorksheetBaseImpl sheet, String drawingsPath, List`1 lstRelationIds, Dictionary`2 dictItemsToRemove)
at Syncfusion.XlsIO.Implementation.XmlReaders.Excel2007Parser.ParseTwoCellAnchor(XmlReader reader, WorksheetBaseImpl sheet, String drawingsPath, List`1 lstRelationIds, Dictionary`2 dictItemsToRemove)
at Syncfusion.XlsIO.Implementation.XmlReaders.Excel2007Parser.ParseDrawings(XmlReader reader, WorksheetBaseImpl sheet, String drawingsPath, List`1 lstRelationIds, Dictionary`2 dictItemsToRemove)
at Syncfusion.XlsIO.Implementation.XmlSerialization.WorksheetDataHolder.ParseDrawings(WorksheetBaseImpl sheet, Relation drawingRelation, Dictionary`2 dictItemsToRemove)
at Syncfusion.XlsIO.Implementation.XmlSerialization.WorksheetDataHolder.ParseDrawings(WorksheetBaseImpl sheet, String relationId, Dictionary`2 dictItemsToRemove)
at Syncfusion.XlsIO.Implementation.XmlReaders.Excel2007Parser.ParseDrawings(XmlReader reader, WorksheetBaseImpl sheet, Dictionary`2 dictItemsToRemove)
at Syncfusion.XlsIO.Implementation.XmlReaders.Excel2007Parser.ParseAfterSheetData(XmlReader reader, WorksheetImpl sheet, MemoryStream& streamCF, String strParentPath, Dictionary`2 dictItemsToRemove)
at Syncfusion.XlsIO.Implementation.XmlReaders.Excel2007Parser.ParseSheet(XmlReader reader, WorksheetImpl sheet, String strParentPath, MemoryStream& streamStart, MemoryStream& streamCF, List`1 arrStyles, Dictionary`2 dictItemsToRemove, Dictionary`2 dictUpdatedSSTIndexes)
at Syncfusion.XlsIO.Implementation.XmlSerialization.WorksheetDataHolder.ParseWorksheetData(WorksheetImpl sheet, Dictionary`2 dictUpdateSSTIndexes, Boolean parseOnDemand)
at Syncfusion.XlsIO.Implementation.WorksheetImpl.ParseData(Dictionary`2 dictUpdatedSSTIndexes)
at Syncfusion.XlsIO.Implementation.XmlReaders.Excel2007Parser.ParseWorksheets(Dictionary`2 dictUpdatedSSTIndexes, Boolean parseOnDemand)
at Syncfusion.XlsIO.Implementation.XmlSerialization.FileDataHolder.ParseWorkbook(List`1& themeColors, Boolean parseOnDemand)
at Syncfusion.XlsIO.Implementation.XmlSerialization.FileDataHolder.ParseDocument(List`1& themeColors, Boolean parseOnDemand)
at Syncfusion.XlsIO.Implementation.WorkbookImpl.ParseExcel2007Stream(Stream stream, String password, Boolean parseOnDemand)
at Syncfusion.XlsIO.Implementation.WorkbookImpl.ParseStream(Stream stream, String password, ExcelVersion version, ExcelParseOptions options)
at Syncfusion.XlsIO.Implementation.WorkbookImpl..ctor(IApplication application, Object parent, Stream stream, ExcelParseOptions options, ExcelVersion version)
at Syncfusion.XlsIO.Implementation.ApplicationImpl.CreateWorkbook(Object parent, Stream stream, ExcelVersion version, ExcelParseOptions options)
at Syncfusion.XlsIO.Implementation.Collections.WorkbooksCollection.Open(Stream stream, ExcelVersion version, ExcelParseOptions options)
at Syncfusion.XlsIO.Implementation.Collections.WorkbooksCollection.Open(Stream stream, ExcelOpenType openType)
at TestController.<Post>d__1.MoveNext()
ExcelEngine excelEngine = new ExcelEngine();
IApplication application = excelEngine.Excel;
//For Azure platform
application.EnablePartialTrustCode = true; |