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

Free Support Forum - aspose.com

Cells Patterning

Is the below cell formating possible with Aspose.cells version number -

objWorkSheet.Cells(20, 20).Style.SetTwoColorGradient(Color.FromArgb(Red, Green, Blue), Color.FromArgb(Red, Green, Blue), GradientStyleType.Horizontal, 1)

This message was posted using Aspose.Live 2 Forum

Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I am afraid your required feature is not available in Aspose.Cells V You may download and try our latest version of Aspose.Cells V 4.9.1 from the following location.


It supports your requested feature and also supports a lot of new and enhanced features.

Thank You & Best Regards,


We have downloaded your latest version of Aspose.Cells V 4.9.1 and we have gone through the samples provided. But that dint solve our question and dint meet our requirement. Our requirement is simple.

In MS Excel 2007, when we right click on a cell in the work sheet we get a option “Format Cells”. On selecting the “Format Cells” we have a option “Fill Effects” in “Fill” Tab. We need to implement the gradient (two color, horizontal) effects for cells in our excel sheet generated. Is this possible with Aspose.Cells?

For implementing the above mentioned requirement we have tried below mentioned piece of code but that dint work out.

Color.Green, GradientStyleType.Horizontal, 1)

Please help us to implement the requirement.

Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Please see the following sample code to set the gradient color as per your requirement:

Workbook workbook = new Workbook();

Worksheet sheet = workbook.Worksheets[0];

Aspose.Cells.Cell cell = sheet.Cells["A1"];

Style style = cell.GetStyle();

style.SetTwoColorGradient(Color.Red, Color.Green, GradientStyleType.Horizontal, 1);


workbook.Save(@"C:\News\gradient.xlsx", FileFormatType.Excel2007Xlsx);

Thank You & Best Regards,

The code sample you have provided doesnt work in the version we have ( Can u please implement the sample code with latest verion of Aspose.Cells and share with us?


The sample code Nausherwan provided works fine with the latest version v4.9.1, you may download it @:
//or you may simply download the dll version:

Thank you.

Hey That was great!!! This was possible with the latest version of the dll.