Aspose 7.1.1.0 dll issue

Hi,

I am using aspose dll version 7.1.1.0 for generating excel report. I am using "SetTwoColorGradient()" function for gradient backgroud in cell. But when i assign second color as red in this function the output give blue and vice versa same with yellow and cyan........

Below you find the code snippet that i used-

case "RED":

objStyle.SetTwoColorGradient(System.Drawing.Color.White, System.Drawing.Color.Blue, Aspose.Cells.Drawing.GradientStyleType.FromCenter, 1);

break;

case "GRAY":

objStyle.SetTwoColorGradient(System.Drawing.Color.White, System.Drawing.Color.Gray, Aspose.Cells.Drawing.GradientStyleType.FromCenter, 1);

break;

case "YELLOW":

objStyle.SetTwoColorGradient(System.Drawing.Color.White, System.Drawing.Color.Cyan, Aspose.Cells.Drawing.GradientStyleType.FromCenter, 1);

break;

case "BLUE":

objStyle.SetTwoColorGradient(System.Drawing.Color.White, System.Drawing.Color.Red, Aspose.Cells.Drawing.GradientStyleType.FromCenter, 1);

break;

default:

objStyle.SetTwoColorGradient(System.Drawing.Color.White, System.Drawing.Color.White, Aspose.Cells.Drawing.GradientStyleType.FromCenter, 1);

break;

I attach the output image herewith.

Please reply me on this asap....

Thanks

Hi,


Well, I tested with my following sample code and it works fine. I am using v7.1.1.2: Aspose.Cells for .NET v7.1.1.2

Sample code:
Workbook workbook = new Workbook();
//Set default font
Style style = workbook.DefaultStyle;
style.Font.Name = “Tahoma”;
workbook.DefaultStyle = style;
Worksheet sheet = workbook.Worksheets[0];
//Set the name of worksheet
sheet.Name = “Data”;
Cells cells = workbook.Worksheets[0].Cells;
//Put a value into a cell
cells[“A1”].PutValue(“Region”);
cells[“A2”].PutValue(“France”);
cells[“A2”].Characters(0, 1).Font.Name = “Symbol”;
cells[“A3”].PutValue(“Germany”);
cells[“A4”].PutValue(“England”);
cells[“A5”].PutValue(“Sweden”);
cells[“A6”].PutValue(“Italy”);
cells[“A7”].PutValue(“Spain”);
cells[“A8”].PutValue(“Portugal”);
cells[“B1”].PutValue(“Sale”);
cells[“B2”].PutValue(70000);
cells[“B3”].PutValue(55000);
cells[“B4”].PutValue(30000);
cells[“B5”].PutValue(40000);
cells[“B6”].PutValue(35000);
cells[“B7”].PutValue(32000);
cells[“B8”].PutValue(10000);

Style stl = cells[“B8”].GetStyle();
stl.SetTwoColorGradient(System.Drawing.Color.White, System.Drawing.Color.Red, Aspose.Cells.Drawing.GradientStyleType.FromCenter, 1);
cells[“B8”].SetStyle(stl);
//Save the excel file
workbook.Save(“e:\test2\_testin.xlsx”);

I have also attached the output file here, if you still find any issue, kindly create a complete runnable sample code (same as mine) and paste it here with output file, we will check it soon.

Thank you.