我在生成excel时遇到未定义的变量错误我的代码如下
ApplicationContext context=new ClassPathXmlApplicationContext("bean.xml");
EmployeeList employees=context.getBean("employeelist", EmployeeList.class);
InputStream is = getClass().getClassLoader().getResourceAsStream("EmployeeTemplate1.xlsx");
List<Employee>list=employees.getList();
try {
OutputStream os = new FileOutputStream("target/object_collection_output.xls");
Context context1 =new Context();
context1.putVar("list",list);
JxlsHelper.getInstance().processTemplate(is, os, context1);
is.close();
os.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}