Cells Patterning

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

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 4.5.0.0. You may download and try our latest version of Aspose.Cells V 4.9.1 from the following location.

http://www.aspose.com/community/files/51/.net-components/aspose.cells-for-.net/entry236731.aspx

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

Thank You & Best Regards,

Hi,

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.

objWorkSheet.Cells(20,
20).Style.SetTwoColorGradient(Color.Red,
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);

cell.SetStyle(style);

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 (4.5.0.0). Can u please implement the sample code with latest verion of Aspose.Cells and share with us?

Hi,

The sample code Nausherwan provided works fine with the latest version v4.9.1, you may download it @:
//Insaller
http://www.aspose.com/community/files/51/.net-components/aspose.cells-for-.net/entry236731.aspx
//or you may simply download the dll version:
http://www.aspose.com/community/files/51/.net-components/aspose.cells-for-.net/entry236790.aspx

Thank you.

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

Thanks!!!