Thanks for your further input.
We were able to replicate your issue using the following code. The degree does not have any effect on the gradient when the file is saved in Xls format. However, it does have effect in Xlsx format.
So, Xlsx format works fine but Xls format is failing. Please check the screenshot below.
We have logged this issue in our database. We will look into it and fix this issue. Once the issue is fixed or we have some other update for you, we will let you know asap.
This issue has been logged as CELLSNET-41211.
Below is a sample code for testing this issue.
for (double degree = 0; degree <= 1.0; degree = degree + 0.1)
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets;
Shape rectShape = worksheet.Shapes.AddAutoShape(AutoShapeType.Rectangle, 10, 10, 10, 10, 50, 100);
rectShape.FillFormat.SetOneColorGradient(Color.Red, degree, GradientStyleType.Horizontal, 4);
workbook.Save(“out” + degree + “.xls”, SaveFormat.Excel97To2003);
workbook.Save(“out” + degree + “.xlsx”, SaveFormat.Xlsx);