@@ -0,0 +1,1697 @@
+package com.glaf.dts.test;%0A%0Aimport java.util.Date;%0Aimport java.util.List;%0A%0Aimport org.json.JSONArray;%0Aimport org.json.JSONObject;%0Aimport org.junit.Test;%0A%0Aimport com.glaf.core.base.ColumnModel;%0Aimport com.glaf.core.base.TableModel;%0Aimport com.glaf.core.context.ContextFactory;%0Aimport com.glaf.core.parse.ParserFacede;%0Aimport com.glaf.core.util.DateUtils;%0A%0Apublic class ParseTest %7B%0A%0A%09@Test%0A%09public void testImportXls() %7B%0A%09%09String mappingFile = %22./report/mapping/PomsParts.mapping.xml%22;%0A%09%09String dataFile = %22./report/data/importparts.xls%22;%0A%09%09ContextFactory.hasBean(%22dataSource%22);%0A%09%09ParserFacede parser = new ParserFacede();%0A%09%09List%3CTableModel%3E rows = parser.parse(mappingFile, dataFile, %22root_%22%0A%09%09%09%09+ DateUtils.getDateTime(%22yyyyMMddHHmmss%22, new Date()), true);%0A%09%09if (rows != null && !rows.isEmpty()) %7B%0A%09%09%09JSONArray array = new JSONArray();%0A%09%09%09for (TableModel model : rows) %7B%0A%09%09%09%09JSONObject jsonObject = new JSONObject();%0A%09%09%09%09List%3CColumnModel%3E columns = model.getColumns();%0A%09%09%09%09if (columns != null && !columns.isEmpty()) %7B%0A%09%09%09%09%09for (ColumnModel col : columns) %7B%0A%09%09%09%09%09%09if (col.getName() != null) %7B%0A%09%09%09%09%09%09%09jsonObject.put(col.getName(), col.getValue());%0A%09%09%09%09%09%09%7D%0A%09%09%09%09%09%09if (col.getColumnName() != null) %7B%0A%09%09%09%09%09%09%09jsonObject.put(col.getColumnName().toLowerCase(),%0A%09%09%09%09%09%09%09%09%09col.getValue());%0A%09%09%09%09%09%09%7D%0A%09%09%09%09%09%7D%0A%09%09%09%09%7D%0A%09%09%09%09if (model.getIdColumn() != null) %7B%0A%09%09%09%09%09ColumnModel col = model.getIdColumn();%0A%09%09%09%09%09if (col.getName() != null) %7B%0A%09%09%09%09%09%09jsonObject.put(col.getName(), col.getValue());%0A%09%09%09%09%09%7D%0A%09%09%09%09%09if (col.getColumnName() != null) %7B%0A%09%09%09%09%09%09jsonObject.put(col.getColumnName().toLowerCase(),%0A%09%09%09%09%09%09%09%09col.getValue());%0A%09%09%09%09%09%7D%0A%09%09%09%09%7D%0A%09%09%09%09array.put(jsonObject);%0A%09%09%09%7D%0A%09%09%09System.out.println(array.toString('%5Cn'));%0A%09%09%7D%0A%09%7D%0A%0A%7D%0A

add parse test case