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 Nov 27, 2014 11:21 am

When you use the AVERAGE formula in Excel and the range of cells includes empty cells, it will calculate the average based upon only those cells with a value (see image).

Image

However if I call Workbook.CalculateAllValue() on a workbook with this included it throws an error.

Code: Select all
Workbook workbook = new Workbook();
workbook.LoadFromFile(@"C:\temp\Book1.xlsx", ExcelVersion.Version2010);
workbook.CalculateAllValue();


As I do not know the range of cells at designtime, how can I get this work?
Attachments
Book1.zip
(5.79 KiB) Downloaded 532 times

Jon
 
Posts: 6
Joined: Tue Nov 25, 2014 9:33 am

Fri Nov 28, 2014 2:22 am

Hello,

Thanks for your inquiry. After an initial test with Spire.XLS Pack Hotfix Version:7.6.1, I am afraid, I could not see any issue with your input documents, could you please clarify what the issue is?
Thanks,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Fri Nov 28, 2014 9:15 am

I am using version 7.6.1.
Here is a screenshot of the error in Visual Studio:

Image

Jon
 
Posts: 6
Joined: Tue Nov 25, 2014 9:33 am

Fri Nov 28, 2014 9:51 am

Hello,

Thanks for your quick reply. What's your develop environment?

Thanks,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Fri Nov 28, 2014 3:08 pm

My Dev Environment:

Windows 8.1 Pro
Visual Studio 2013 Pro update 4

I enclose a copy of the test project.
Attachments
SpireTest.zip
(28.58 KiB) Downloaded 537 times

Jon
 
Posts: 6
Joined: Tue Nov 25, 2014 9:33 am

Mon Dec 01, 2014 3:00 am

Hello,

Sorry for late reply as weekend.
Thanks for the information. Here is a newest hotfix you could try.
http://www.e-iceblue.com/downloads/hot_ ... 7.6.18.zip
Thanks,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Mon Dec 01, 2014 8:42 am

Hi,
Hotfix 7.6.18 appears to have solved that issue.

Thank you.

Jon
 
Posts: 6
Joined: Tue Nov 25, 2014 9:33 am

Mon Dec 01, 2014 9:20 am

Hello,

Glad to hear that. Feel free to contact us if you have any questions or needs.

Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Return to Spire.XLS