Invalid formula Error on File Open

Hi Team,

In few excel files, I am facing an issue when I open the file in aspose.cells

When I open the file, It gives “Invalid Formula” exception.
(Files are attached)
Pivot Files.zip (30.9 KB)

Code:
objWB = New Aspose.Cells.Workbook(pstrFileName,)

Exception:
Aspose.Cells.CellsException: Invalid formula:
at .( , String , String , ​ )
at .( , ​ )
at .( , ​ )
at . ( , ​ , )
at .( , ​ , , Boolean , Boolean )
at .( , ​ , , Boolean , Boolean )
at .( , ​ , , Boolean )
at ​ .(String , Worksheet )
at . ( ​ )
at . ( ​ )
at .( ​ )
at . ()
at .()
at .(Workbook , LoadOptions )
at Aspose.Cells.Workbook.(Stream , LoadOptions , Boolean )
at Aspose.Cells.Workbook.(String , LoadOptions )
at Aspose.Cells.Workbook…ctor(String file, LoadOptions loadOptions)
at AsposeApp.Form1.OpenExcelFile(String pstrFileName) in D:\Software\ASPOSE\AsposeApp\Form1.vb:line 20

File is attached.

@vsabalpara,

Thanks for the template files and details.

After an initial test, I am able to observe the issue as you mentioned. I found an Invalid formula error by opening the template XLS/XLSX file via Aspose.Cells APIs:
e.g
Sample code:

Workbook workbook = new Workbook("E:\\test2\\Pivot Link1.xlsx");

I have logged a ticket with an id “CELLSNET-45816” for your issue. We will look into it soon.

Once we have an update on it, we will let you know here.

@vsabalpara

Thanks for using Aspose APIs.

This is to inform you that we have fixed your issue CELLSNET-45816 now. We will soon provide the fix after performing QA and including other enhancements and fixes.

Thank you very much

Please let me know once QA is done.

@vsabalpara

Please download and try the following fix and let us know your feedback.

Thanks for the quick reply.

Fix worked for Pivot Link1.xlsx file.
but the same fix is not working for Pivot Link1.xls (attached)Pivot Link1.zip (10.7 KB)

@vsabalpara,

You are right. It works for XLSX file but does produce the same error when loading your XLS file. I used the following sample code to reproduce the issue:
Workbook workbook = new Workbook("E:\\test2\\Pivot Link1.xls");

I have reopened your issue again. We will look into it soon.

Once we have any new information, we will share it with you.

@vsabalpara,

This is to inform you that we have fixed your issue completely now, it will work fine for XLS file format too. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.

@vsabalpara

Please download and try the following fix and let us know your feedback.

I checked with the files, it is working :grinning:
Thanks for the quick reply.

@vsabalpara

Thanks for your feedback and using Aspose.Cells.

It is good to know that your issue is resolved with the latest fix. Let us know if you encounter any other issue, we will be glad to look into it and help you further.

The issues you have found earlier (filed as CELLSNET-45816) have been fixed in this Aspose.Cells for .NET 18.1 update.

Please also check the following article:

Hi,

We are facing the same problem and I tried the fixes posted here but still get the the following error.

Invalid formula:"=sheet3!#ref!".

Can you help me ?

Thank you.

@IT_bestellingen,

Thanks for providing us error description.

Could you provide us your template file and paste your sample code (runnable) to reproduce the issue on our end, we will check it soon.

Thanks for the quick reply.
Here you have link containing a zip file. Within the zip is a mail that contains an attached Excel file. I didn’t save it seperatly because when I open it and save it again the issue sometimes disappears.

FW FW Comanda Mittal - Aprilie 2018.zip (42.7 KB)
The code :

Aspose.Cells.License lic = new Aspose.Cells.License();
lic.SetLicense(“Aspose.Total.lic”);

Workbook RomanianEIBook = new Workbook (xlsStream);
WorksheetCollection myWorkSheets = RomanianEIBook.Worksheets;
Worksheet romanianMainWorksSheet = null;

@IT_bestellingen,

Thanks for the template file and sample code segment.

After an initial test, I am able to observe the issue as you mentioned by loading your template XLSX file (attached to the mail message file). I found an exception: Invalid formula:"=sheet3!#ref!" when opening the XLSX file. I extracted the Excel file form the mail to save to the disk first:
e.g
Sample code:

Workbook RomanianEIBook = new Workbook("e:\\test2\\Rosteel email integration HDCL_Z template.xlsx");

I have logged a ticket with an id “CELLSNET-45947” for your issue. We will look into it soon.

Once we have an update on it, we will let you know here.

@IT_bestellingen

Thanks for using Aspose.Cells.

Please download and try the following fix for your issue CELLSNET-45947 and let us know your feedback.

Hi,

I tested the .NET 2.0 version and it works fine. It solves my problem but when I set the license I do get the following

{“The subscription included in this license allows free upgrades until 05 Feb 2016, but this version of the product was released on 24 Feb 2018. Please renew the subscription or use a previous version of the product.”}

Is there a version of Apose.Cells for .NET that solves my issue and is covered within the lincense?

Thanks for the solution.

@IT_bestellingen,

Good to know that your issue is sorted out by the new fix/version.
Well, we are very sorry but you got to upgrade your subscription to use newer versions and fixes, there is no alternative to it. We cannot include fixes into older versions, the fixes are based on latest APIs set only.

FYI, when you purchase a license for the product, you are authorized to use the license file with any new (and upcoming (official versions)) versions or hot fixes of the component for the next whole year. Moreover, your license will never expire if you continue to use your license with the product’s version/hotfix that should be released before your subscription expiry date.

It means if you upgrade your subscription now, you can use any new/upcoming versions/fixes of the product for the next whole year for free.

The issues you have found earlier (filed as CELLSNET-45947) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by Amjad_Sahi