ChangePalette problem - black cells

Using version 1.8.2.0 of Aspose.Excel.

I'm using the ChangePalette call to add my own colours - and am then applying the colours using

mysheet.Cells(row, col).Style.Pattern = BackgroundType.Solid
mysheet.Cells(row, col).Style.ForegroundColor = myColour

I've put debug into my code to double check the colours I'm adding to the palette are the colours I'm using

Adding Color : Color [A=255, R=255, G=242, B=242]
Using Color : Color [A=255, R=255, G=242, B=242]

but when I download the cells are black! I'm building my palette before creating any sheets - though the ordering doesn't seem to make any difference.

Any ideas?

Thanks

Have you tried our latest version/fix.

I haven’t found the problem in my machine.

If the problem still exists in your place, please zip your code and send to me by email. Thank you.

@mustard57,
Aspose.Excel is discarded and replaced by Aspose.Cells which supports all the features of its predecessor as well as latest features in different versions of MS Excel. Using this new product enhanced operations related to cells formatting can be performed. Here is an example which demonstrates this feature where palette is changed by adding Orchid color at 55th index.

// Instantiating an Workbook object
Workbook workbook = new Workbook();

// Adding Orchid color to the palette at 55th index
workbook.ChangePalette(Color.Orchid, 55);

// Adding a new worksheet to the Excel object
int i = workbook.Worksheets.Add();

// Obtaining the reference of the newly added worksheet by passing its sheet index
Worksheet worksheet = workbook.Worksheets[i];

// Accessing the "A1" cell from the worksheet
Cell cell = worksheet.Cells["A1"];

// Adding some value to the "A1" cell
cell.PutValue("Hello Aspose!");

// Defining new Style object
Style styleObject = workbook.CreateStyle();
// Setting the Orchid (custom) color to the font
styleObject.Font.Color = Color.Orchid;

// Applying the style to the cell
cell.SetStyle(styleObject);

// Saving the Excel file
workbook.Save(dataDir + "book1.out.xls", SaveFormat.Auto);

A detailed article is available here which describes cells formatting with examples:
Cells formatting

Download the free trial version of this product here:
Aspose.Cells for .NET (Latest Version)

For user ease, a ready to run solution containing hundereds of examples is available here. Just download it and test exciting features of this product without writing any code yourself.