Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. public void printCellDataToConsole(Vector dataHolder) throws SQLException {
  2. // this is for the rows in the file, set to one to skip the headings
  3. List<String> studentInformation = new ArrayList<>();
  4. for (int i = 1; i < dataHolder.size(); i++) {
  5. Vector cellStoreVector = (Vector) dataHolder.elementAt(i);
  6. // this is for the colums in the table
  7. for (int j = 0; j < cellStoreVector.size(); j++) {
  8. HSSFCell myCell = (HSSFCell) cellStoreVector.elementAt(j);
  9. String stringCellValue = myCell.toString();
  10. System.out.print(stringCellValue + "t");
  11. }
  12. connectToDatabase.ammendTableInDatabase("INSERT INTO Student VALUES (" + cellStoreVector.get(0) + ",'" + cellStoreVector.get(1) + "','" + cellStoreVector.get(2) + "','" + cellStoreVector.get(3) + "','" + cellStoreVector.get(4) + "'," + cellStoreVector.get(5) + ",'" + cellStoreVector.get(6) + "')");
  13. System.out.println();
  14. }
  15. }
  16.  
  17. 111223361
  18. 111223362
  19. 111223364
  20. 111223363
  21. 111223366
  22.  
  23. 1.11223361E8
  24. 1.11223362E8
  25. 1.11223364E8
  26. 1.11223363E8
  27. 1.11223366E8
  28.  
  29. cellValueLong = Long.valueOf(myCell.toString());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement