Commit d7b26d3f726c08180e60614cd10948e178fcc3e8
Exists in
master
fix conflict
Showing
1 changed file
with
11 additions
and
4 deletions
Show diff stats
src/main/java/com/taover/util/UtilExcel.java
| @@ -400,7 +400,7 @@ public class UtilExcel { | @@ -400,7 +400,7 @@ public class UtilExcel { | ||
| 400 | if(end > rowLimit){ | 400 | if(end > rowLimit){ |
| 401 | end = rowLimit; | 401 | end = rowLimit; |
| 402 | } | 402 | } |
| 403 | - DecimalFormat df = new DecimalFormat("0.#"); | 403 | + DecimalFormat df = new DecimalFormat("0.####"); |
| 404 | for(int i=start; i<end+1; ++i){ | 404 | for(int i=start; i<end+1; ++i){ |
| 405 | Row row = sheet.getRow(i); | 405 | Row row = sheet.getRow(i); |
| 406 | if(row == null){ | 406 | if(row == null){ |
| @@ -507,8 +507,15 @@ public class UtilExcel { | @@ -507,8 +507,15 @@ public class UtilExcel { | ||
| 507 | 507 | ||
| 508 | public static void main(String args[]){ | 508 | public static void main(String args[]){ |
| 509 | //String filepath = "C:\\Users\\root\\Desktop\\千丁-6.27.xlsx"; | 509 | //String filepath = "C:\\Users\\root\\Desktop\\千丁-6.27.xlsx"; |
| 510 | - String filepath = "C:\\Users\\gaoming\\Desktop\\测试返单数量.xlsx"; | ||
| 511 | - //String filepath = "C:\\Users\\EDZ\\Desktop\\aaa.xlsx"; | 510 | + //String filepath = "C:\\Users\\gaoming\\Desktop\\cccc.xls"; |
| 511 | + DecimalFormat df = new DecimalFormat("0.####"); | ||
| 512 | + | ||
| 513 | + System.out.println(df.format(3.333113F)); | ||
| 514 | + System.out.println(df.format(3.3)); | ||
| 515 | + System.out.println(df.format(3.3300)); | ||
| 516 | + | ||
| 517 | + | ||
| 518 | + String filepath = "C:\\Users\\EDZ\\Desktop\\acccc.xls"; | ||
| 512 | List<List<Object>> data = null; | 519 | List<List<Object>> data = null; |
| 513 | 520 | ||
| 514 | try { | 521 | try { |
| @@ -532,7 +539,7 @@ public class UtilExcel { | @@ -532,7 +539,7 @@ public class UtilExcel { | ||
| 532 | // TODO Auto-generated catch block | 539 | // TODO Auto-generated catch block |
| 533 | e.printStackTrace(); | 540 | e.printStackTrace(); |
| 534 | } | 541 | } |
| 535 | - List<Short> styleList = new ArrayList<Short>(); | 542 | +// List<Short> styleList = new ArrayList<Short>(); |
| 536 | // for(int i=0; i<data.size(); ++i){ | 543 | // for(int i=0; i<data.size(); ++i){ |
| 537 | // if(i == 1)styleList.add(Short.valueOf(HSSFColor.RED.index)); | 544 | // if(i == 1)styleList.add(Short.valueOf(HSSFColor.RED.index)); |
| 538 | // else styleList.add(null); | 545 | // else styleList.add(null); |