Major refactor of reading from excel to db

This commit is contained in:
Maciek Głowacki
2020-09-21 17:45:52 +02:00
parent e91965e9b5
commit c449bc22e1
16 changed files with 158 additions and 167 deletions

View File

@ -2,7 +2,7 @@ package com.plannaplan.configutils;
import java.io.IOException;
import java.io.InputStream;
import java.util.Hashtable;
import java.util.HashMap;
import java.util.Iterator;
import org.apache.poi.xssf.usermodel.XSSFSheet;
@ -22,7 +22,7 @@ public class FileReader {
public FileData read() {
FileData result = null;
try {
InputStream fis = this.fileInputStream;
XSSFWorkbook workbook = new XSSFWorkbook(fis);
@ -33,12 +33,12 @@ public class FileReader {
Row row = rowIt.next();
Iterator<Cell> cellIt = row.cellIterator();
Hashtable<String, Integer> keys = new Hashtable<>();
HashMap<String, Integer> keys = new HashMap<>();
int index = 0;
while (cellIt.hasNext()) {
Cell c = cellIt.next();
keys.put(c.toString(), index);
index+=1;
index += 1;
}
rowIt.remove();