Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2014
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. while(rowITR.hasNext())
  2. {
  3. row = (XSSFRow)rowITR.next();
  4.  
  5. cellITR = row.cellIterator();
  6.  
  7. while(cellITR.hasNext())
  8. {
  9.  
  10. cell = (XSSFCell)cellITR.next();
  11.  
  12. switch (cell.getCellType()){
  13.  
  14. case XSSFCell.CELL_TYPE_STRING:
  15.  
  16. if((cell.getReference().startsWith("A")&&(cell.getRowIndex()>1)))
  17. {
  18. inSheet=cell.getStringCellValue();
  19.  
  20. }
  21.  
  22. if((cell.getReference().startsWith("B")&&(cell.getRowIndex()>1)))
  23. { inCell=cell.getStringCellValue();
  24. inLIST.add(inCell);
  25.  
  26. }
  27.  
  28. if((cell.getReference().startsWith("C")&&(cell.getRowIndex()>1)))
  29. {
  30. outSheet=cell.getStringCellValue();
  31.  
  32. }
  33.  
  34. if((cell.getReference().startsWith("D")&&(cell.getRowIndex()>1)))
  35. {
  36. outCell=cell.getStringCellValue();
  37. outLIST.add(outCell); //
  38.  
  39.  
  40. }
  41.  
  42.  
  43. break;
  44. case XSSFCell.CELL_TYPE_BLANK:
  45.  
  46. break;
  47.  
  48.  
  49. }
  50.  
  51. }
  52.  
  53. }
  54.  
  55. -----------------------------------------------------------------------
  56. sheet-info.xlsx
  57.  
  58. <http://i.stack.imgur.com/5ivsd.gif>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement