We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Cells for Java and Style.setPatternStyle

Hi,



When I do this for a cell background:



style.setPatternColor(patternColor);

style.setPatternStyle(PatternType.SOLID);



The cell background is consequently white.



When I do this:



style.setPatternColor(patternColor);

style.setPatternStyle(PatternType.VERTICAL_STRIPE);



The background is striped as expected with the expected color.



Do I do something wrong or is it a bug?



Thanks,



Marcel

Hi Marcel,

Thanks for your inquiry.

Well, the background color will not be applied if you specify None or Solid patteren types, please change your code to:

style.setColor(patternColor);
style.setPatternStyle(PatternType.SOLID);

And for further reference, please check: http://www.aspose.com/documentation/file-format-components/aspose.cells-for-.net-and-java/colors-background-patterns.html

Thank you.

Solved, thanks!