GemBox Support Forum

Excel Conditional Formating-Value Negative


I saw an error today I would like to see if anyone has encountered. We have some conditional formatting in a spreadsheet that will turn a cell red if its = 0, formatting is excel based. We use gembox to send values for a vb program to a spreadsheet and return the calculations. If the sum of the function in the cell is 0, the cell is getting set to -1.5 E15. We could not figure out why we were seeing a non 0 value in our program. We looked at the spreadsheet(saved with the data causing the error) and it looked good. I then opened up the same spreadsheet in libreoffice. I now see the value of my cell to be the same small negative number seen in my program. I then traced it back to a cell that, in excel, has conditional formatting to turn it red. The condition is not all there and the cell is always red, and always negative. Has anyone seen this? I can just remove the conditional formatting from my spreadsheet, but wanted to alert everyone on what I am seeing.


Hi Brian,

Can you send us your file?
Unfortunately, without it, I cannot say for sure what the problem is.

Anyway, I presume that there is a difference with GemBox.Spreadsheet formula calculation and Microsoft Excel’s. Note, when you open the file in Microsoft Excel it will automatically recalculate the formulas, that is why you don’t see that -1.5 E15 value.