StringBuffer pathInSB = new StringBuffer(System.getProperty("user.dir"));
pathInSB.append("\\in.xlsx");
StringBuffer contentSB = new StringBuffer();
ImportExecl poi = new ImportExecl();
List> list = poi.read(pathInSB.toString());
if (list != null) {
for (int i = 0; i < list.size(); i++) {
// System.out.print("第" + (i + 1) + "行");
List
for (int j = 0; j < cellList.size(); j++) {
// System.out.print(" 第" + (j + 1) + "列值:");
if(i>0 && j>0){
// System.out.print(" " + cellList.get(j));
contentSB.append(" " + cellList.get(j));
}
}
contentSB.append("\r\n");
}
}
StringBuffer pathOutSB = new StringBuffer(System.getProperty("user.dir"));
pathOutSB.append("\\out.rdf");
WriteUTFFile.writeUTFFile(pathOutSB.toString(), GenRdfFileFromExcel.genRdfHead()+contentSB.toString());
详细代码请联系514662851 罗生