Workbook.Load(Stream)
New DiscussionHi,
We are facing an issue with Workbook.Load(Stream) method. The size of byte[] is 321832. Same byte array works fine with System.IO.File.WriteAllBytes.
using (Stream stream = new MemoryStream(byteArray))
{
Workbook wb = Workbook.Load(stream); //This line is throwing error
}
Exception –
at Infragistics.Documents.Core.WorkItem.ExceptionInfo..ctor(Exception e)
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 Infragistics.UserControls.SpreadsheetControl.PreviewExcelFileFromByteArray(Byte[] byteArray)
Libraries being used are –
Infragistics4.Documents.Core.v15.2 (15.2.20152.1000)
Infragistics4.Documents.Excel.v15.2 (15.2.20152.1000)
Please suggest the resolution.
Thanks
Vishal