We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

XlsIO on Azure: 'A generic error occurred in GDI+' when loading .xlsx with embedded .emf graphics

Thread ID:

Created:

Updated:

Platform:

Replies:

130280 May 4,2017 01:08 AM May 5,2017 10:27 AM ASP.NET Web Forms 1
loading
Tags: XlsIO
Andre Freitag
Asked On May 4, 2017 01:08 AM

Hi,

it seems that XlsIO (from Syncfusion.AspNet.Mvc5.FileFormats 15.1.0.41) is unable to open an .xlsx file with an embedded .emf image on Microsoft Azure.

ExcelEngine.Workbooks.Open throws a System.Runtime.InteropServices.ExternalException stating 'A generic error occurred in GDI+' when trying to do so (example .xlsx see attachment).

Is there anything I can do about it? Like disabling the loading of graphics or similar? If not, any chance you will address this problem?


Thanks in advance

André


PS: stack trace

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()

Attachment: IncludesEmf.xlsx_9e040c02.zip

Abirami Varadharajan [Syncfusion]
Replied On May 5, 2017 10:27 AM

Hi Andre,  
  
We are able to reproduce the issue “GDI Exception thrown while opening the file in Azure”. A support incident to track the status of this issuehas been created under your account. Please log on to our support website to check for further updates.   
    
   
Please let us know if you have any concerns.  
  
Regards,  
Abirami.  


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;