Free Support Forum -

Pallet Changes and Style Setting breaks Excel color selection buttons

I have just upgraded to ver

Apart from it not being backward compatible with other versions relating to style selection, it also seems to break the excel color selection on the produced excel document.

The Code:
private Color LINE_HIGHLIGHT_ROW_COLOR = System.Drawing.ColorTranslator.FromHtml(“WhiteSmoke”);

_excel.ChangePalette(LINE_HIGHLIGHT_ROW_COLOR, 55);

styleIndex = _excel.Styles.Add();
Style itemStyleHighlightUnlocked = _excel.Styles[styleIndex];
itemStyleHighlightUnlocked.Font.Size = DATA_FONT_SIZE;
itemStyleHighlightUnlocked.Font.IsBold = false;
itemStyleHighlightUnlocked.Font.IsItalic = false;
itemStyleHighlightUnlocked.IsLocked = false;
itemStyleHighlightUnlocked.ForegroundColor = LINE_HIGHLIGHT_ROW_COLOR;
itemStyleHighlightUnlocked.HorizontalAlignment = TextAlignmentType.General;
itemStyleHighlightUnlocked.Borders[BorderType.TopBorder].LineStyle = CellBorderType.Hair;
itemStyleHighlightUnlocked.Borders[BorderType.BottomBorder].LineStyle = CellBorderType.Thin;
itemStyleHighlightUnlocked.Borders[BorderType.LeftBorder].LineStyle = CellBorderType.Hair;
itemStyleHighlightUnlocked.Borders[BorderType.RightBorder].LineStyle = CellBorderType.Hair;
itemStyleHighlightUnlocked.Name = “ItemStyleHighlightUnlocked”;

sheet.Cells[6, 4].Style = _excel.Styles[“ItemStyleHighlightUnlocked”];
If any of this code is executed the font color and fill color buttons in excel open but all color boxes are greyed out and are all unselectable and the color does not render in the worksheet. Has your support for pallet modifications broken in the current version.

If I use an existing color e.g. green, it works fine

This is frustrating because I managed to get you component to do almost everything I needed, I was having problems setting formulas so I downloaded the latest component, formulas now kinda work but the style color setting is now broken.

I am still evaluating the component and it worries me that the lates version can breaks existing functionality.

I can send you a copy of the excel file if you want.

What’s the version of your previous Aspose.Excel?

If possible, please send me the copy of your created excel file. Thanks.

The previous version I had was downloaded on the 7th Apr 2004.

I have has some problem reproducing as when I save the file and reopen it it seems to be kinda ok but the color is not Whitesmoke it is white. And white is the color that is rendered in the Fill Color Drop Box.

I will forward the copy if I can get it to fail completly or I will at least repost so you know the results of my tests.


Latest hotfix seems to have no problems.

I changed no code and ran the process using the Version. All pallet changes take and are represented propperly in the resulting excel document with no corruption of the Fill Color or Fore Color Drop Boxs.