NullReferenceException in GridJsWorkbook ExportToJson

I’m looking at upgrading our Cells .NET GridJs script to 26.1.0 and the attached file is failing when calling ExportToJson(). The repro is minimal:

        Config.FileCacheDirectory = outputDir;
        Config.PictureCacheDirectory = imgCacheDir.FullName;

        Workbook workbook = OpenFile(source);
        GridJsWorkbook jsWorkbook = new GridJsWorkbook();
        jsWorkbook.ImportExcelFile(documentId, workbook);
        jsonContents = jsWorkbook.ExportToJson();

in-bhp.xlsx.zip (612.7 KB)

The stacktrace:

Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
   at .e(Series , Boolean )
   at .e(Chart )
   at .()
   at .(Hashtable , Font , String , String[] , Int32 , Int32 , Int32& , Int32 , Int32& , Boolean& , Worksheet , String )
   at .(Workbook , String , String )
   at .(String )
   at Aspose.Cells.GridJs.GridJsWorkbook.ExportToJson()
   at Program.<<Main>$>g__ConvertFile|0_1(Options o) in <snip>

This also fails on 25.12.0 however works fine on 25.11.0.

@jrf.att

You’re seeing a NullReferenceException when calling GridJsWorkbook.ExportToJson with Aspose.Cells .NET 26.1.0 (and also with 25.12.0), while the same code works with 25.11.0 【1】.

Possible next steps

  1. Temporary workaround – Continue using version 25.11.0 for the GridJs export, as you confirmed it works in that version.
  2. Isolate the trigger – If you can, try removing potentially problematic objects (e.g., charts, ActiveX shapes) from the workbook before calling ExportToJson to see whether the exception disappears. This may help identify the part of the file that causes the failure.
  3. Report the issue – Provide the failing workbook (in‑bhp.xlsx.zip) and the full stack trace (as you have already) to Aspose support in this thread so the team can investigate further.

Please let us know whether the workaround or the isolation test changes the behavior, and we’ll continue to assist you here.

@jrf.att
Thansk for your sample file, we can reproduce this issue.
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSGRIDJS-2230

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.