$[user.name]\t$[user.age]\t$[user.city]
public class User {
private String name;
private int age;
private String city;
}
public class JxlsExample {
public static void main(String[] args) throws IOException {
User user = new User();
user.setAge(30);
Context context = new Context();
context.putVar("user", user);
try (InputStream is = new FileInputStream("template.xlsx");
OutputStream os = new FileOutputStream("report.xlsx")) {
JxlsHelper.getInstance().processTemplate(is, os, context);
}
}
}
$[users]{user.id}\t$[users]{user.name}\t$[users]{user.age}