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.

Thu May 28, 2020 10:35 am

Hello,

I using Spire.XLS 10.5.7.

I'm trying to get the date difference using the DATEDIF function.
If you specify "Y", "M", "D" in the argument UNIT, it works well.
However, if you specify "YM", the result will be #NUM.

Recalculating in MS Excel gives the correct results, but
We need to get this result in Spire.XLS.

Code: Select all
using (var workbook = new Workbook())
{
    workbook.LoadFromFile("src.xlsx");

    var sheet = workbook.Worksheets[0];
    sheet["_begin_date"].Value = "1920/01/01";
    sheet["_end_date"].Value = "2048/05/12";
    workbook.CalculateAllValue();

    workbook.SaveToFile("out.xlsx");
}


Thank you and best regards,
Attachments
spirexls_issue_20200528__00.zip
(14.37 KiB) Downloaded 160 times

nf64
 
Posts: 24
Joined: Fri Aug 17, 2018 1:45 am

Fri May 29, 2020 5:45 am

Hi,

Thanks for your inquiry.
I have reproduced your issue and logged it into our bug tracking system with the ticket SPIREXLS-2389 for further investigating. If there is any update, we will inform you. Sorry for the inconvenience caused.

Sincerely,
Sara
E-iceblue support team
User avatar

Sara.Yang
 
Posts: 33
Joined: Wed May 06, 2020 1:05 am

Wed Jul 08, 2020 5:33 am

Hello,

Thanks for your patient waiting.
Glad to tell you that we released the Spire.XLS Pack(Hotfix) Version:10.7.2 that fixes your issue. Welcome to download it from the following link.
Our website: https://www.e-iceblue.com/Download/down ... t-now.html
Nuget: https://www.nuget.org/packages/Spire.XLS/10.7.2

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Wed Jul 08, 2020 9:43 am

Hello,

We have confirmed that this issue is fixed in Spire.XLS 10.7.2.
I am always grateful for your help.

Thank you.

nf64
 
Posts: 24
Joined: Fri Aug 17, 2018 1:45 am

Wed Jul 08, 2020 11:27 am

Hello,

Thanks for your feedback.
If you encounter any issues related to our products in the future, please feel free to contact us.
Wish you all the best!

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Return to Spire.XLS