Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void printCellDataToConsole(Vector dataHolder) throws SQLException {
- // this is for the rows in the file, set to one to skip the headings
- List<String> studentInformation = new ArrayList<>();
- for (int i = 1; i < dataHolder.size(); i++) {
- Vector cellStoreVector = (Vector) dataHolder.elementAt(i);
- // this is for the colums in the table
- for (int j = 0; j < cellStoreVector.size(); j++) {
- HSSFCell myCell = (HSSFCell) cellStoreVector.elementAt(j);
- String stringCellValue = myCell.toString();
- System.out.print(stringCellValue + "t");
- }
- 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) + "')");
- System.out.println();
- }
- }
- 111223361
- 111223362
- 111223364
- 111223363
- 111223366
- 1.11223361E8
- 1.11223362E8
- 1.11223364E8
- 1.11223363E8
- 1.11223366E8
- cellValueLong = Long.valueOf(myCell.toString());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement