Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Fri Nov 24, 2023 9:16 am

Hi...

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.
Attachments
TEST1_copy.zip
(8 KiB) Downloaded 334 times

Sungkyu_min
 
Posts: 30
Joined: Fri Jan 07, 2022 5:53 am

Fri Nov 24, 2023 10:10 am

Hi,

Thank you for your inquiry.
I have tested the excel file and code you provided and reproduced your issue. I have recorded this issue in our bug tracking system with the number "SPIREXLS-5004". Our development team will investigate and fix it in the future. If this issue is resolved, we will notify you as soon as possible. We deeply apologize for the inconvenience caused.

Sincerely,
Ula
E-iceblue support team
User avatar

Ula.wang
 
Posts: 282
Joined: Mon Aug 07, 2023 1:38 am

Mon Jan 08, 2024 2:10 am

Hi,

Thank you for your patience.
I'm glad to inform you that we just released Spire.XLS for .Net 14.1 has resolved your issue with SPIREXLS-5004. Welcome to download the test.

Website download link:https://www.e-iceblue.com/Download/download-excel-for-net-now.html
Nuget link:https://www.nuget.org/packages/Spire.XLS/14.1.0

Sincerely,
Ula
E-iceblue support team
User avatar

Ula.wang
 
Posts: 282
Joined: Mon Aug 07, 2023 1:38 am

Return to Spire.XLS