Exception handling (or pdb files, or source files)


GemBox.Spreadsheet 49.0.1335

Whilst the calculation completes as expected for our excel file, we note that we get a lot of SpreadsheetCalculationExceptions, some of these we would like to investigate, however as the Gembox.Spreadsheet.dll is catching and not throwing these we lose any information about which cell etc is causing the error. We also don’t seem to have access to a pdb file which could help debug the exception. We know that we can break when the exception is thrown but this only lets us see the call to worksheet.calculate.

As a workaround we are iterating the every cell in the workbook.

  1. Is it possible to force the gembox.spreadsheet.dll to raise the exceptions (rather than catching) - this would mean that we have the option of handling the exceptions ourselves?

  2. Is there a way to find the cell information for the exceptions raised - other than iterating all of them?

  3. Is there access to the pdb or source files?

Hi Phil,

  1. Unfortunately no, this is currently not possible.

  2. You could check the cells that have ExcelCell.ValueType set to CellValueType.Error.

  3. No. I’m afraid that GemBox.Spreadsheet is an obfuscated library so the “.pdb” file wouldn’t be of much help to you.


Hi Mario,

Thanks for that… it does help as I can simply iterate all the cells as I am doing but only where the value type is error.