I have to save the row, column and contents of a worksheet. For this I created a two-dimensional matrix. My difficulty is how do I initialize it? I believe the statement is no longer correct because I get ArrayIndexOutOfBoundsException
. In this situation, array is the appropriate data structure?
if ("Veículo".equals(cell.getStringCellValue())) {
String[][] referencia = new String[][];
for (int i = cell.getColumnIndex(); i < 4; i++) {
referencia[cell.getRow().getRowNum()][cell.getColumnIndex()] = cell.getStringCellValue();
}
}