We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

IFERROR and WorkBook.Combine

Hi,

I have an issue with using the function WorkBook.Combine when the 2nd workbook has an IFERROR function within a cell. I am using .NET 3.5, Aspose.Cells 6.0.1 and Excel 2010. The first and second workbooks are created from template Excel files replacing some values. I have tried using Combine with both xls and xlsx files. The issue is that when I use the Combine method, the IFERROR function does not compute but instead I get a _xlfn prefix in front of the function. The interesting thing is that it works fine if I am not using the Combine function. Googling this resulted in saying that this usually occurs if you are using an older version of Excel (earlier than 2007).

I was able to work around this for now by using IF(ISERROR(),,) instead. However, this syntax is much more cumbersome.

Can you please investigate the issue and let me know if you can fix it?

Thanks,

Scott

Hi,


We appreciate if you could create/paste a sample test code with template files or preferably a sample console application, zip it and post it here to reproduce the issue. It will help us really to isolate the issue to accurately figure it out.

Thanks for your time.

Hi,


By the way, could you try our latest fixed version v6.0.1.7: (Please download: Aspose.Cells for .NET v6.0.1.7) if it makes any difference.

Thank you.

Hi,

I tried the program with the latest version of Aspose.Cells and it still did not work. Please see the attached console application. It creates a file called WeeklyReportSummary_20110816.xls in the bin directory. Look at that file in any of the worksheets past the first worksheet. You will see that cell C14 says #NAME and has a formula (=_xlfn.IFERROR_1(B14/((B14*D9)/C31*(D22+D23)/8),0)=_xlfn.IFERROR_1(B14/((B14*D9)/C31*(D22+D23)/8),0)). Note that the _xlfn. is not in the template file. The next cell down uses the IF(ISERROR()) and works fine.

Thanks,


Scott

One other piece of information. If you are not combining the workbooks but just replacing the tokens within the workbook that has the IFERROR function, it works fine.

Thanks,

Scott

Hi,


Thanks for sharing the sample project.

After an initial test, I have found the issue as you have mentioned. I have logged a ticket for the issue with an id: CELLSNET-29929. We will figure it out soon.

Thank you.
Hi,

After analyzing your issue further, we come to know that the IFERROR is an advanced feature since Excel 2007. If you save the file that contains IFERROR function, MS Excel will throw a warning message. Could you save them as XLSX file? If you still want to use XLS file, please use If(ISERROR(),) such as to Cell “C15”, otherwise, I am afraid, you will get #Name! in MS Excel 2003.

Thanks for your understanding!