Free Support Forum -

Conditional Formatting doesn't work in Smart Markers with shift


I came across an issue that the conditional formatting.

If any cell has conditional formatting and with smart marker variable:


the conditional formatting is not copied to the “expanded” cells, but if I don’t use the “shift”, i can see the conditional formatting exist in these new cells.

is it by design or a bug? In our case, if we want to fill the values horizontally, we have to use the “shift” otherwise the columns won’t be aligned.



Thanks for the details.

It might be a bug but we are not sure about it. Could you provide us sample code (runnable) or preferably a simple console demo application (you may zip it prior attaching it here) and template file to show the issue, we will log a ticket with the artifacts after confirming the issue to get it resolved.

PS. Please use dynamic dataset/datatable in code to remove any inter dependencies with external source or database, so we could run your code seamlessly.


A sample code is attached. (155.9 KB)

Because of the upload file size limitation, the Aspose.Cells.dll is not included, please add it to the “lib” folder which is referenced by the project, and after you run it, please check the generated “Result.xlsx” file.



Thanks for providing us sample code with template file.

After an initial test, I am able to reproduce the issue as you mentioned by using your sample code with your template file. I found that the conditional formatting does not work properly in Smart Markers with shift parameter.
Sample code:

   var wbd = new WorkbookDesigner(); 
            wbd.Workbook = new Workbook("e:\\test2\\ConditionalFormattingTest.xlsx"); 

            wbd.SetDataSource("Array1", new string[5] { "A", "B", "C", "D", "E" }); 

            var dataTable = new DataTable("Table1"); 

            for (var i = 0; i < 5; i++) 
                var dr = dataTable.NewRow(); 
                dr["ColumnA"] = "Row" + i; 



            var ms = new MemoryStream(); 

            wbd.Workbook.Save(ms, SaveFormat.Xlsx); 

            using (FileStream file = new FileStream("e:\\test2\\out1.xlsx", FileMode.OpenOrCreate, FileAccess.Write)) 

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

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


This is to inform you that we have fixed your issue (logged earlier as “CELLSNET-46048”) now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.

Thanks! @Amjad_Sahi


Thanks for using Aspose APIs.

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

@shakeel.faiz, CELLSNET-46048 is fixed for me, thanks!


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-46048) have been fixed in this update. Please also check the document/article for your reference: