Commit 5492c740 authored by lola's avatar lola

Update Application.java

parent 1f8e941d
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
......@@ -33,9 +32,11 @@ public class Application {
for (int row = 0; row < sheet.getLastRowNum() + 1; row++) {
// get data
Row r = sheet.getRow(row);
String index = String.format("%03.0f", Float.parseFloat(r.getCell(0).toString().trim()));
String name = r.getCell(1).toString().trim();
list.add(new CustomData(index, name,"out"+index+".docx"));
if(r.getCell(0)!= null){
String index = String.format("%03.0f", Float.parseFloat(r.getCell(0).toString().trim()));
String name = r.getCell(1).toString().trim();
list.add(new CustomData(index, name,"out"+index+".docx"));
}
}
return list;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment