Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open existing file from stream of drill down data by SSRS in excel of Syncfusion

I have the url of the file as below. First I want to download content of the file. The file has drill down from SSRS configuration. After that I am opening a stream with the code app.Workbooks.Open(stream);

    using (var client = new WebClient())
    {
        var content = client.DownloadData(url); // Get Existing file

        Stream stream = new MemoryStream(content);
        stream.Position = 0;

        using (ExcelEngine xlsEngine = new ExcelEngine())
        {
            IApplication app = xlsEngine.Excel;
            IWorkbook workBook = app.Workbooks.Open(stream);
        }
    }

Syncfusion Version:

Syncfusion.XlsIO.Base, Version=15.4460.0.20

Question:

If I try to create a new workbook from existing stream (SSRS report has drill down) file I get the following error

object not set to an instance of an object
like image 359
Soner Avatar asked Aug 06 '19 17:08

Soner


1 Answers

The issue is raised based on the worksheet data in your source document. So, it will be more easier to analyse, if you could share the below information

  1. The stack trace of the exception.
  2. The input document loaded as URL.
  3. Working version of Syncfusion Assemblies.

We have prepared simple sample to open the file retrieved from URL as stream and the sample can be downloaded from following link.

Sample Link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Sample84020950.zip

Regards,

Abirami.

like image 194
Abirami Varadharajan Avatar answered Oct 23 '22 03:10

Abirami Varadharajan