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. Image for the cookie policy date

Error creating xsl from template

Hi, When I want to create a workbook from a template that contains a reference to some xla files, I receive the error below (sf 2.1.0.9). Do you guys have any idea if this is something that can be done with ExcelRW or should I just give up? Thanks in advance! Guy --- System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: Invalid parameter used. at System.Drawing.Image.FromStream(Stream stream, Boolean useEmbeddedColorManagement) at System.Drawing.Image.FromStream(Stream stream) at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoMetafilePicture.ParseStructure() at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoBase.FillRecord(Byte[] data, Int32 iOffset) at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoBase..ctor(MsoBase parent, Byte[] data, Int32 offset, GetNextMsoDrawingData dataGetter) at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoBase..ctor(MsoBase parent, Byte[] data, Int32 offset) at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoMetafilePicture..ctor(MsoBase parent, Byte[] data, Int32 iOffset) at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsofbtBSE.ParseStructure() at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoBase.FillRecord(Byte[] data, Int32 iOffset) at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoBase..ctor(MsoBase parent, Byte[] data, Int32 offset, GetNextMsoDrawingData dataGetter) at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoBase..ctor(MsoBase parent, Byte[] data, Int32 offset) at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsofbtBSE..ctor(MsoBase parent, Byte[] data, Int32 iOffset) --- End of inner exception stack trace --- at System.Reflection.RuntimeConstructorInfo.InternalInvoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean isBinderDefault) at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.ConstructorInfo.Invoke(Object[] parameters) at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoFactory.CreateMsoRecord(MsoBase parent, MsoRecords recordType, Byte[] data, Int32& iOffset) at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoFactory.CreateMsoRecord(MsoBase parent, Byte[] data, Int32& iOffset) at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoContainerBase.ParseItems(Byte[] data, Int32 iOffset) at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoContainerBase.ParseStructure() at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoBase.FillRecord(Byte[] data, Int32 iOffset) at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoBase..ctor(MsoBase parent, Byte[] data, Int32 offset, GetNextMsoDrawingData dataGetter) at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoBase..ctor(MsoBase parent, Byte[] data, Int32 offset) at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoContainerBase..ctor(MsoBase parent, Byte[] data, Int32 iOffset) at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsofbtBstoreContainer..ctor(MsoBase parent, Byte[] data, Int32 iOffset) --- End of inner exception stack trace --- at System.Reflection.RuntimeConstructorInfo.InternalInvoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean isBinderDefault) at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.ConstructorInfo.Invoke(Object[] parameters) at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoFactory.CreateMsoRecord(MsoBase parent, MsoRecords recordType, Byte[] data, Int32& iOffset) at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoFactory.CreateMsoRecord(MsoBase parent, Byte[] data, Int32& iOffset) at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoContainerBase.ParseItems(Byte[] data, Int32 iOffset) at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoContainerBase.ParseStructure() at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoBase.FillRecord(Byte[] data, Int32 iOffset) at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoBase..ctor(MsoBase parent, Byte[] data, Int32 offset, GetNextMsoDrawingData dataGetter) at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoBase..ctor(MsoBase parent, Byte[] data, Int32 offset) at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoContainerBase..ctor(MsoBase parent, Byte[] data, Int32 iOffset) at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsofbtDggContainer..ctor(MsoBase parent, Byte[] data, Int32 iOffset) --- End of inner exception stack trace --- at System.Reflection.RuntimeConstructorInfo.InternalInvoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean isBinderDefault) at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.ConstructorInfo.Invoke(Object[] parameters) at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoFactory.CreateMsoRecord(MsoBase parent, MsoRecords recordType, Byte[] data, Int32& iOffset) at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoFactory.CreateMsoRecord(MsoBase parent, Byte[] data, Int32& iOffset) at Syncfusion.ExcelRW.Parser.Biff_Records.MSODrawingGroupRecord.ParseStructure() at Syncfusion.ExcelRW.Parser.Biff_Records.BiffRecordRaw.FillRecord(BinaryReader reader) at Syncfusion.ExcelRW.Parser.Biff_Records.BiffContinueRecordRaw.FillRecord(BinaryReader reader) at Syncfusion.ExcelRW.Parser.BiffRecordFactory.GetRecord(TBIFFRecord type, BinaryReader reader) at Syncfusion.ExcelRW.Parser.BiffRecordFactory.GetRecord(BinaryReader reader) at Syncfusion.ExcelRW.Parser.BiffReader.PeekRecord() at Syncfusion.ExcelRW.Implementation.WorkbookImpl.Parse(BiffReader reader, Boolean ignoreStyle) at Syncfusion.ExcelRW.Implementation.WorkbookImpl..ctor(IApplication application, Object parent, String FileName, Boolean ignoreStyles) at Syncfusion.ExcelRW.Implementation.WorkbookImpl..ctor(IApplication application, Object parent, String FileName) at Syncfusion.ExcelRW.Implementation.ApplicationImpl.CreateWorkbook(Object parent, String strTemplateFile) at Syncfusion.ExcelRW.Implementation.Collections.WorkbooksCollection.Open(String Filename) at Syncfusion.ExcelRW.ExcelUtils.CreateWorkBookUsingTemplate(String templateLocation)

1 Reply

AD Administrator Syncfusion Team March 22, 2006 01:44 PM UTC

Hi Guy, Would it be possible to send us the template file so that we can test with the latest version?. You can also open a Direc-Trac insident so that the attachment remains confidential. You can also try our latest build which most likely fixes this issue ftp://syncpatch.syncfusion.com/EssentialStudio/4.1.0.63/syncfusionessentialstudiosetup.exe Best regards, Stephen. >Hi, > >When I want to create a workbook from a template that contains a reference to some xla files, I receive the error below (sf 2.1.0.9). Do you guys have any idea if this is something that can be done with ExcelRW or should I just give up? > >Thanks in advance! > >Guy > >--- > >System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. >---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. >---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. >---> System.ArgumentException: Invalid parameter used. >at System.Drawing.Image.FromStream(Stream stream, Boolean useEmbeddedColorManagement) >at System.Drawing.Image.FromStream(Stream stream) >at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoMetafilePicture.ParseStructure() >at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoBase.FillRecord(Byte[] data, Int32 iOffset) >at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoBase..ctor(MsoBase parent, Byte[] data, Int32 offset, GetNextMsoDrawingData dataGetter) >at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoBase..ctor(MsoBase parent, Byte[] data, Int32 offset) >at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoMetafilePicture..ctor(MsoBase parent, Byte[] data, Int32 iOffset) >at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsofbtBSE.ParseStructure() >at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoBase.FillRecord(Byte[] data, Int32 iOffset) >at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoBase..ctor(MsoBase parent, Byte[] data, Int32 offset, GetNextMsoDrawingData dataGetter) >at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoBase..ctor(MsoBase parent, Byte[] data, Int32 offset) >at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsofbtBSE..ctor(MsoBase parent, Byte[] data, Int32 iOffset) >--- End of inner exception stack trace --- >at System.Reflection.RuntimeConstructorInfo.InternalInvoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean isBinderDefault) >at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) >at System.Reflection.ConstructorInfo.Invoke(Object[] parameters) >at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoFactory.CreateMsoRecord(MsoBase parent, MsoRecords recordType, Byte[] data, Int32& iOffset) >at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoFactory.CreateMsoRecord(MsoBase parent, Byte[] data, Int32& iOffset) >at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoContainerBase.ParseItems(Byte[] data, Int32 iOffset) >at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoContainerBase.ParseStructure() >at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoBase.FillRecord(Byte[] data, Int32 iOffset) >at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoBase..ctor(MsoBase parent, Byte[] data, Int32 offset, GetNextMsoDrawingData dataGetter) >at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoBase..ctor(MsoBase parent, Byte[] data, Int32 offset) >at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoContainerBase..ctor(MsoBase parent, Byte[] data, Int32 iOffset) >at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsofbtBstoreContainer..ctor(MsoBase parent, Byte[] data, Int32 iOffset) >--- End of inner exception stack trace --- >at System.Reflection.RuntimeConstructorInfo.InternalInvoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean isBinderDefault) >at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) >at System.Reflection.ConstructorInfo.Invoke(Object[] parameters) >at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoFactory.CreateMsoRecord(MsoBase parent, MsoRecords recordType, Byte[] data, Int32& iOffset) >at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoFactory.CreateMsoRecord(MsoBase parent, Byte[] data, Int32& iOffset) >at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoContainerBase.ParseItems(Byte[] data, Int32 iOffset) >at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoContainerBase.ParseStructure() >at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoBase.FillRecord(Byte[] data, Int32 iOffset) >at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoBase..ctor(MsoBase parent, Byte[] data, Int32 offset, GetNextMsoDrawingData dataGetter) >at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoBase..ctor(MsoBase parent, Byte[] data, Int32 offset) >at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoContainerBase..ctor(MsoBase parent, Byte[] data, Int32 iOffset) >at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsofbtDggContainer..ctor(MsoBase parent, Byte[] data, Int32 iOffset) >--- End of inner exception stack trace --- >at System.Reflection.RuntimeConstructorInfo.InternalInvoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean isBinderDefault) >at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) >at System.Reflection.ConstructorInfo.Invoke(Object[] parameters) >at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoFactory.CreateMsoRecord(MsoBase parent, MsoRecords recordType, Byte[] data, Int32& iOffset) >at Syncfusion.ExcelRW.Parser.Biff_Records.MsoDrawing.MsoFactory.CreateMsoRecord(MsoBase parent, Byte[] data, Int32& iOffset) >at Syncfusion.ExcelRW.Parser.Biff_Records.MSODrawingGroupRecord.ParseStructure() >at Syncfusion.ExcelRW.Parser.Biff_Records.BiffRecordRaw.FillRecord(BinaryReader reader) >at Syncfusion.ExcelRW.Parser.Biff_Records.BiffContinueRecordRaw.FillRecord(BinaryReader reader) >at Syncfusion.ExcelRW.Parser.BiffRecordFactory.GetRecord(TBIFFRecord type, BinaryReader reader) >at Syncfusion.ExcelRW.Parser.BiffRecordFactory.GetRecord(BinaryReader reader) >at Syncfusion.ExcelRW.Parser.BiffReader.PeekRecord() >at Syncfusion.ExcelRW.Implementation.WorkbookImpl.Parse(BiffReader reader, Boolean ignoreStyle) >at Syncfusion.ExcelRW.Implementation.WorkbookImpl..ctor(IApplication application, Object parent, String FileName, Boolean ignoreStyles) >at Syncfusion.ExcelRW.Implementation.WorkbookImpl..ctor(IApplication application, Object parent, String FileName) >at Syncfusion.ExcelRW.Implementation.ApplicationImpl.CreateWorkbook(Object parent, String strTemplateFile) >at Syncfusion.ExcelRW.Implementation.Collections.WorkbooksCollection.Open(String Filename) >at Syncfusion.ExcelRW.ExcelUtils.CreateWorkBookUsingTemplate(String templateLocation)

Loader.
Live Chat Icon For mobile
Up arrow icon