We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

After new laptop I can't create Excelsheet anymore

I'm working on a C# REST application using XlsIO v16.4.0.42
I have this dll referenced: D:\Program Files (x86)\Syncfusion\Essential Studio\Windows\16.4.0.42\Assemblies\4.6\Syncfusion.XlsIO.Base.dll

I received a new laptop and now some of my Excel creation routines fail.
My workflow is to open an existing template and fill in some cells. Some cells might have formulas.
When my template doesn't have formulas I have no problem but with formulas, it is failing on the argument separator:
Syncfusion.XlsIO.Implementation.Exceptions.ParseException: Unexpected token.Unexpected token type: Identifier, string value:   at position 14. Formula: IF(AND(H8>=18;H8<=21);"J";"N"), Position: 14
I also deployed a new version to my webserver on Azure using my new laptop and the same Excel with the formula is NOT failing.

So it must be something locally on my machine.

The main difference is that I'm running a Dutch version of Windows, but my old laptop also ran this version.

I have not changed anything in the code. I did, however, change the target framework to v4.7

This is the start of my code:


                var application = excelEngine.Excel;
                application.DefaultVersion = ExcelVersion.Excel2010;
                application.EnableIncrementalFormula = true;
                excelEngine.ThrowNotSavedOnDestroy = true;

                //Open a workbook with a worksheet.
                var workbook = application.Workbooks.Open(new MemoryStream(Resource.LIV2018, false));

                // Template was made with Dutch Excel:
                workbook.SetSeparators(',', ';');

The part that is causing the problems:

             worksheet.Range[$"{columnWithFormula}{startRow}:{columnWithFormula}{row}"].Formula = worksheet.Range[$"{columnWithFormula}{startRow}"].Formula;

This line is in my code for months now, without any problems

Please advice.

1 Reply

DB Dilli Babu Nandha Gopal Syncfusion Team February 12, 2019 04:38 PM UTC

Hi Paul, 

We have fixed the reported issue with Exception is thrown while opening Excel file with formula in Dutch culture. The issue fix will be included in our upcoming 2019 Volume 1 release which is estimated to be rolled out by March 2019 tentatively. 

Regards, 
Dilli babu. 


Loader.
Live Chat Icon For mobile
Up arrow icon