### Question:
XlsUtils { public static HSSFWorkbook format(InputStream is, Map<String, Object> markerValues) { HSSFWorkbook document = loadDocument(is); return format(document, markerValues); } private  XlsUtils(); static String loadText(InputStream is); static String loadText(HSSFWorkbook workbook); static List<String> findMarkers(InputStream is); static HSSFWorkbook format(InputStream is,
                                    Map<String, Object> markerValues); static HSSFWorkbook format(HSSFWorkbook workbook,
                                    Map<String, Object> markerValues); static HSSFWorkbook loadDocument(InputStream is);  }### Answer:
@Test public void testFormat() throws Exception { Map<String, Object> markerValues = new HashMap<String, Object>(); markerValues.put("title", "标题"); markerValues.put("exportTime", "2012-01-01"); markerValues.put("columnNames", new String[]{"年度", "数量"}); markerValues.put("rowDatas", new Object[]{ new String[]{"2001", "100"}, new String[]{"2002", "50"}, new String[]{"2003", "150"}}); HSSFWorkbook workbook = XlsUtils.format(getDocumentInputStream(), markerValues); Assert.assertNotNull(workbook); workbook.write(new FileOutputStream(new File("/t/xlsTpl.xls"))); }