Skip to content

Custom style

清沐 edited this page Mar 8, 2020 · 2 revisions

This module is only for DefaultExcelBuilder and DefaultStreamExcelBuilder. Template building is supported naturally.

Title style customization

@ExcelColumn(style={"title->color:red","cell->color:green"})
Integer age;

Content line style customization

@ExcelColumn(style="cell->color:green")
Integer age;

Call method to set style

DefaultExcelBuilder.of(ArtCrowd.class)
                   .style("title->color:red","background-color:green;")
                   .build(dataList);

Use - > separator:

  • title indicates that the style is for the title;
  • cell indicates that the style is for the content line;
  • odd indicates that the style is for odd content lines;
  • even indicates that the style is for even content lines;

For specific style support, please move to:https://github.com/liaochong/myexcel/wiki/Style-support

Clone this wiki locally