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

XlsIo: Bug with conditional formattings and more than one sheet created

Hi guys,

I'm using the current version of your really great XlsIo component (17.3.0.29) to generate Excel files from the scratch, extend existing files, ...

Currently I'm working with a data list containing a boolean property. The column in the worksheet should display True values with a green background, False values with a red background. No problem with the columns ConditionalFormats property.


This works great if the excel file exists and/or I'm adding only one sheet to an existing file.

But in my case, I must add two, three, ... sheets in one file. And in this case, the conditional formattings in the second, third, ... sheet are lost when saving the file.


I've created a small demo in VB.NET (but happens in C# also) to enable you to reproduce the problem.

It doesn't make any difference if I use the ASP.NET, WinForms, ... component. The problem exists in all platforms.

Thank you in advance.

Best Regards,
Stefan

8 Replies

SF Stefan Falz November 28, 2019 03:03 PM

Test project.

Attachment: ConsoleApp1_3fcfd830.7z


KK Konduru Keerthi Konduru Ravichandra Raju Syncfusion Team November 28, 2019 10:55 PM

Hi Stefan, 

Greetings from Syncfusion. 

We are able to reproduce the reported issue with conditional formats and validating it currently. We will update further details on 2nd December 2019. 

Regards, 
Keerthi. 



SF Stefan Falz November 28, 2019 11:02 PM

Hi Keerthi,

thank you very much.

One additional info: If you double line ExcelHelper.CreateExcel( Arguments2 ) in my test project, all is fine. (In production this is not an option because there are many more columns, rows, formattings, formulas, ...)

Module1.vb
ExcelHelper.CreateExcel( Arguments1 )
ExcelHelper.CreateExcel( Arguments2 )
ExcelHelper.CreateExcel( Arguments2 )

Best Regards,
Stefan


KK Konduru Keerthi Konduru Ravichandra Raju Syncfusion Team December 2, 2019 04:19 AM

Hi Stefan, 

Thanks for your update. 

We are still checking the root cause for the issue. The provided additional information helps us in further validation. We will share the validation details on 3rd December 2019. 

Regards, 
Keerthi. 



KK Konduru Keerthi Konduru Ravichandra Raju Syncfusion Team December 3, 2019 08:57 AM

Hi Stefan, 

Thanks for your patience. 

We have confirmed the issue Conditional Formats are missing while creating more than one worksheets and logged a defect report. We will provide the patch for this issue on 17th December 2019. You can track the status of defect report through the following link. 


Meanwhile we suggest you to close the workbook without parsing the parameter, as a workaround, to overcome the issue and continue your work. 

Code Snippet: 

Existing Code Snippet 
Suggested Code Snippet 
Workbook.Close( True ) 
Workbook.Close() 

Regards, 
Keerthi. 



SF Stefan Falz December 3, 2019 09:31 AM

Hi Keerthi,

thank you very much for your info and the workaround.

I can confirm, calling the Workboook.Close() method without any parameter works as expected and all conditional formattings are saved in all sheets.

Kind Regards,
Stefan



KK Konduru Keerthi Konduru Ravichandra Raju Syncfusion Team December 4, 2019 06:56 AM

Hi Stefan, 

We are glad that the provided workaround helped you. 

We will provide the patch as promised on 17th December 2019. 

Regards, 
Keerthi. 



KK Konduru Keerthi Konduru Ravichandra Raju Syncfusion Team December 17, 2019 09:14 AM

Hi Stefan, 

Thanks for the patience. 

We have fixed the issue Conditional Formats are missing while creating more than one worksheets and generated custom assemblies for the version v17.3.0.29. The custom assemblies can be downloaded from the following link. 


We will include the fix in our release version 17.4-SP1 which will be rolled out by end of January 2020. 

Regards, 
Keerthi. 


Loader.
Live Chat Icon For mobile
Up arrow icon