File tree Expand file tree Collapse file tree 1 file changed +12
-13
lines changed
core/src/main/java/info/xiaomo/core/untils Expand file tree Collapse file tree 1 file changed +12
-13
lines changed Original file line number Diff line number Diff line change 11package info .xiaomo .core .untils ;
22
3- import info .xiaomo .core .other .CountryModel ;
43import org .apache .poi .hssf .usermodel .*;
54import org .apache .poi .poifs .filesystem .POIFSFileSystem ;
65
1312import java .util .List ;
1413
1514public class ExcelUtil {
16-
17- public static void main (String [] args ) throws Exception {
18- List <List <String >> listData = getListData ("E:\\ thinkpage_cities.xls" , 1 );
19- List <CountryModel > list = new ArrayList <>();
20- for (List <String > listDatum : listData ) {
21- CountryModel model = new CountryModel ();
22- model .setCityName (listDatum .get (0 ));
23- model .setCityNameEN (listDatum .get (1 ));
24- list .add (model );
25- }
26- System .out .println (list );
27- }
15+ //
16+ // public static void main(String[] args) throws Exception {
17+ // List<List<String>> listData = getListData("E:\\thinkpage_cities.xls", 1);
18+ // List<CountryModel> list = new ArrayList<>();
19+ // for (List<String> listDatum : listData) {
20+ // CountryModel model = new CountryModel();
21+ // model.setCityName(listDatum.get(0));
22+ // model.setCityNameEN(listDatum.get(1));
23+ // list.add(model);
24+ // }
25+ // System.out.println(list);
26+ // }
2827
2928 public static List <List <String >> getListData (String path , int ignoreRows ) throws IOException {
3029 File file = new File (path );
You can’t perform that action at this time.
0 commit comments