Free Support Forum - aspose.com

Multiple palettes missing for Java Aspose.Cells

The .Net version of Aspose.Cells. has the ability to change palettes via workbook.ChangePalette method. I don't see the same capability in the Java version. It is possible to change a given color in the palette but not to change palettes. Is this by design?

Thanks,

Clif...

Hi Clif,

Please use Workbook.getPalette().setColor(int, Color) method to change palettes.

Hi Warren,

I don't understand the answer. Palette.setColor doesn't change palettes. It changes one color in a palette of 56 colors. The documentation entry is as follows.

setColor
public final void setColor(int index,
Color color)Sets the color in the palette at the specified index(0-55).

Parameters:
index - the color index in the palette.
color - the color

A palette is supposed to be a complete alternative group of 56 colors.

--Clif

Hi Clif,

Do you mean that you want raplace a given color with another color? Should The method be like replaceColor(Color givenColor,Color color)?

Or do you want to move the given color to the specific position?

Hi Warren,

I don't want to change a given color. I want to change the to a different palette of colors entirely. According to the documentation Palette.SetColor only changes a single color within the one palette.

Best,

Clif...

Hi Clif,

Please replace each color of the palette with the given color by yourself.