Search code examples
c#gembox-spreadsheet

In Gembox SpreadSheet, is there a way to detect if cell contains an error?


e.g. say an excel cell has a formula like: =5/0 This displays in excel as: #DIV/0!

In c#, the ExcelCell.ValueType is returned as CellValueType.String, and Excell.Value is returned as "#DIV/0!". Is there a standard way to detect if the cell has an error ?

EDIT: clarification: is there a general way to detect if a cell has an error ? For example, in another Excel library (spreadsheet Gear), there is a SpreadsheetGear.ValueType of Error, which allows you to tell for any cell, if there is an error in that cell.


Solution

  • Try using this latest bugfix version: https://www.gemboxsoftware.com/spreadsheet/nightlybuilds/GBS49v1115.zip

    Or this latest NuGet package:
    Install-Package GemBox.Spreadsheet -Version 49.0.1115-hotfix

    Now there is a CellValueType.Errorthat you can use.