Skip to content

Simple mapping

清沐 edited this page Mar 29, 2020 · 1 revision

This function is only for DefaultExcelBuilder, DefaultStreamExcelBuilder.

A common export scenario: export data contains enumerable fields, such as gender, stored in the database as 0, 1, and exported as male and female.

@ExcelColumn(title="gender",mapping="0:male,1:female")
Integer gender;

Use the 'mapping' attribute to separate groups with ',', and each group with ':'. Note that this attribute only supports simple mapping and does not support mapping with ':', ',' special characters

Clone this wiki locally