Hi,
Hi,
Well, I think you cannot set Ole colors for the cells. It looks that you might be using Aspose.Cells in vb script or something else. You should use System.Drawing.Color.FromArgb() instead of System.Drawing.ColorTranslator.FromOle(). Moreover, you should create a .NET wrapper class that can access Aspose.Cells APIs for your tasks. You will access that wrapper class in your vbscript/javascript or else.
Here is my sample VB.NET code that works fine.
Sample code:
Dim workbook As New Workbook()
Dim sheet As Worksheet = workbook.Worksheets(0)
Dim cells As Cells = sheet.Cells
Dim cell As Aspose.Cells.Cell = cells(“A1”)
cell.PutValue(“Test”)
cell.Style.SetTwoColorGradient(System.Drawing.Color.White, System.Drawing.Color.FromArgb(123,234,10), GradientStyleType.Horizontal, 1)
workbook.Save(“f:\test\out_Gradientcellcolor.xlsx”, FileFormatType.Excel2007Xlsx)
Thank you.
No this does not work.
Hi,
Could you post a sample project here to show the issue? We will check it soon.
Thank you.