I am using the following cxode to set the background color and foreground color.
Thanks for your posting and using Aspose.Cells.
In order to set the background color, you need to set the foreground color property. Please see the following sample code for your more help.
Workbook workbook = new Workbook();
Worksheet sheet = workbook.getWorksheets().get(0);
Cell cell = sheet.getCells().get(“A1”);
Style style = cell.getStyle();
I am setting the foreground. That is a lot of lines of code for setting the style to one cell. I added logic to set the pattern as shown but still no luck. Of note I save my workbook to the output stream. Not as a file on the server.
Is there a way to apply a style to an entire row? Not the whole table and not an individual cell.
cells.getRow() is deprecated. is there another appropriate function?