Error type problem?

Hi,

Try reproducing this:

Open an excel file, Type in A1: =#VALUE! , enter

The result will returns #VALUE!.

Use 2 functions ISFORMULA and ISERROR to check the result, both return TRUE.

However xlsio does not recognize it, so the result when reading the .xlsx file seems different. cell.iserror or cell.isformulaerror or cell.calculatedvalue are not recognized.

Should this be changed? Or will I need to parse its cell.value?

Because I want to identify what type of error it is.


Thanks you!


3 Replies 1 reply marked as answer

AS Atchaya Sekar Syncfusion Team November 18, 2024 05:08 PM UTC

Hi Jamin,

 

We have prepared a sample to identify the types of errors in the worksheet. Please refer to the attached sample and let us know if you have any further questions, encounter any issues, or have additional queries. Feel free to reach out to us.

 

Regards,

Atchaya S.


Attachment: ErrorSample_8959c5db.zip


JA jamin November 18, 2024 05:49 PM UTC

Hi Atchaya,

Just one small issue. if using displaytext or value property it probably won't differentiate if it is text or formula format.

For example if someone types in a string with quote in front of '#VALUE! it will return "#VALUE!" but it is not an error but a string.


Thanks for providing the list, exactly what I needed.



AS Atchaya Sekar Syncfusion Team November 19, 2024 07:55 AM UTC

Hi Jamin,


Thank you for clarifying the issue. To determine if a cell contains a formula, the worksheet["A1"].HasFormula property can be used. This property returns true if the cell contains a formula; otherwise, it returns false. The sample has been modified accordingly; please refer to the sample.

For any further queries or questions, kindly reach out.


Regards,

Atchaya S.


Attachment: ErrorSample_(2)_9b0d86c1.zip

Marked as answer
Loader.
Up arrow icon