Hello!
I am using the Infragistics Excel library to analyze excel files and deliver a reporting base.
I am using Infragistics in version 15.1.20151.2008. When loading some of the files I have for testing, I get the following exception: "System.ArgumentException - width and Height must be non-negative"
StackTrace:
at System.Windows.Rect..ctor(Double x, Double y, Double width, Double height) at Infragistics.Documents.Excel.Serialization.BiffRecordStream.ReadRect() at Infragistics.Documents.Excel.Serialization.BIFF8.EscherRecords.GroupShape.Load(WorkbookLoadManagerExcel2003 loadManager) at Infragistics.Documents.Excel.Serialization.BIFF8.EscherRecords.EscherRecordBase.LoadRecord(WorkbookLoadManagerExcel2003 loadManager, EscherRecordContainerBase parentRecord) at Infragistics.Documents.Excel.Serialization.BIFF8.EscherRecords.EscherRecordContainerBase.Load(WorkbookLoadManagerExcel2003 loadManager) at Infragistics.Documents.Excel.Serialization.BIFF8.EscherRecords.ShapeContainer.Load(WorkbookLoadManagerExcel2003 loadManager) at Infragistics.Documents.Excel.Serialization.BIFF8.EscherRecords.EscherRecordBase.LoadRecord(WorkbookLoadManagerExcel2003 loadManager, EscherRecordContainerBase parentRecord) at Infragistics.Documents.Excel.Serialization.BIFF8.EscherRecords.EscherRecordContainerBase.Load(WorkbookLoadManagerExcel2003 loadManager) at Infragistics.Documents.Excel.Serialization.BIFF8.EscherRecords.GroupContainer.Load(WorkbookLoadManagerExcel2003 loadManager) at Infragistics.Documents.Excel.Serialization.BIFF8.EscherRecords.EscherRecordBase.LoadRecord(WorkbookLoadManagerExcel2003 loadManager, EscherRecordContainerBase parentRecord) at Infragistics.Documents.Excel.Serialization.BIFF8.EscherRecords.EscherRecordContainerBase.Load(WorkbookLoadManagerExcel2003 loadManager) at Infragistics.Documents.Excel.Serialization.BIFF8.EscherRecords.EscherRecordBase.LoadRecord(WorkbookLoadManagerExcel2003 loadManager, EscherRecordContainerBase parentRecord) at Infragistics.Documents.Excel.Serialization.BIFF8.BiffRecords.MSODRAWINGRecord.Load(WorkbookLoadManagerExcel2003 loadManager) at Infragistics.Documents.Excel.Serialization.WorkbookLoadManagerExcel2003.<>c__DisplayClass14.<LoadRecordHelper>b__12() at Infragistics.Documents.Core.Async.If(Boolean condition, Func`1 statement, Func`1 elseStatement) at Infragistics.Documents.Excel.Serialization.WorkbookLoadManagerExcel2003.LoadRecordHelper(Biff8RecordBase record) at Infragistics.Documents.Excel.Serialization.WorkbookLoadManagerExcel2003.LoadCurrentRecord() at Infragistics.Documents.Excel.Serialization.WorkbookLoadManagerExcel2003.LoadAllRecords() at Infragistics.Documents.Excel.Serialization.WorkbookLoadManagerExcel2003.<LoadAllRecords>b__9() at Infragistics.Documents.Core.WorkItem.WorkItemAsync.ExecuteCore(WorkItemScheduler scheduler) at Infragistics.Documents.Core.WorkItem.Execute(WorkItemScheduler scheduler) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at TryThrowExceptionDispatchInfo(Object ) at Infragistics.Documents.Core.WorkItem.ExceptionInfo.Rethrow() at Infragistics.Documents.Core.WorkItem.RethrowIfExceptional() at Infragistics.Documents.Core.WorkItem.RunNextWorkItem(WorkItemScheduler scheduler) at Infragistics.Documents.Core.WorkItem.Execute(WorkItemScheduler scheduler) at Infragistics.Documents.Core.WorkItemScheduler.SynchronousImpl.Execute(WorkItem workItem) at Infragistics.Documents.Core.WorkItemExtensions.GetResult[TResult](WorkItem`1 this) at Infragistics.Documents.Excel.Workbook.Load(Stream stream, WorkbookLoadOptions loadOptions) at cmdIndexer.cmdIndexer.ComputeExcelFile()
The Excle file is loaded via
Dim st As FileStream = New FileStream(cmdIndexer.exlFileData.strFilePath.ToString(), FileMode.Open, FileAccess.Read, FileShare.ReadWrite) book = Workbook.Load(st)
I also have tried Workbook.Load(cmdIndexer.exlFileData.strFilePath.ToString()) but the error is thrown with this command.
The files are not opened by someone else when this error occurs. The error occurs only with *.xls files. Excel 2007 does not seem to make problems. The files are stored on a connected USB harddisk (during development) and on a network folder (in production)
Thank you for your help.
After contacting my customer about this issue I got the OK to build an example solution. Please contact me so that I could send you the solution.
Thank you
Hello,
I have opened a private case for you so that you can provide your sample. The case number is CAS-157836-C4N2<0. You will see it located here: https://es.infragistics.com/my-account/support-activity
Let me know if you have any questions regarding this matter.
Just in case... the case number is actually "CAS-157836-C4N2M0" :) but you should still see it listed in your account's support activity page: https://es.infragistics.com/my-account/support-activity.
Hello Matthew!
I have attached a sample solution already, and now the case has the state "awaiting customer action"?Thank you for the information
Best regards
Hello Mike!
The solution is attached to the support case "CAS-157836-C4N2M0", not the forum thread. The problems is triggered by the WPF libraries, not the WinForms libraries.
Please move the thread into the WPF Forum.Thank you
I don't see any attachments anywhere in this thread. Can you re-attach your sample solution?