there is a excel file in the attached file.
If enter normal numbers in cells A1 and A2, the merged cell D1 will function normally.
- Code: Select all
Worksheet worksheet = workbook.Worksheets[0];
worksheet["A1"].Value2 = 1;
worksheet["A2"].Value2 = "0";
worksheet.CalculateAllValue();
workbook.SaveToFile(path);
The problem is that when insert a character into the A1 or A2 value,
the formula that looks directly at A1 and A2 handles an error, but D1 does not handle the error normally.
- Code: Select all
Worksheet worksheet = workbook.Worksheets[0];
worksheet["A1"].Value2 = 1;
worksheet["A2"].Value2 = "ERROR";
worksheet.CalculateAllValue();
workbook.SaveToFile(path);
After doing some tests, it seems that this problem occurs when cell D1 is merged. Is there a solution?
I have a problem with values, and when an error occurs in a formula, I want to get the value `#VALUE!` from cell D1.