extrange wrong error when disableXLSXNumberCellFormat is true
dacopan opened this issue · 9 comments
Currently when try parse attached files we have a error on parse number cells
- java.lang.NullPointerException: Cannot invoke "String.length()" because "address" is null
- java.lang.ArrayIndexOutOfBoundsException: Attempt to modify attribute at illegal index: 5
After exhaustive debuggin I can find that when
this line run, somethings extrange and errors occurs after pass this line
Thank you for contributing to Poiji! Feel free to create a PR If you want to contribute directly :)
Hi @dacopan ,
I'll look at the problem, thank you!
can you share your entity model and all code you run as well @dacopan ?
Hi, sorry by the late, this is my Entity, UqaiExcelBase
has only rowIndex
please tell me if you need more info
package com.uqai.excelutil.dto;
import com.poiji.annotation.ExcelCell;
import com.poiji.annotation.ExcelCellName;
import java.math.BigDecimal;
import java.time.LocalDate;
/**
* @author dacopan on 19/3/22
*/
public class AutoImport extends UqaiExcelBase {
//marca modelo cilindraje fabricacion activo valor celular
@ExcelCellName(value = "fabricacion", mandatory = false)
private LocalDate fecha;
@ExcelCell(0)
private String clase;
@ExcelCell(1)
private String tipo;
@ExcelCell(2)
private String subtipo;
@ExcelCell(3)
private String marca;
@ExcelCell(4)
private String modelo;
@ExcelCell(5)
private String submodelo;
@ExcelCell(6)
private String dsc;
@ExcelCell(7)
private Double pmercado;
@ExcelCell(8)
private Double ptoma;
@ExcelCell(9)
private String anio;
@ExcelCell(10)
private String cil;
@ExcelCell(11)
private String com;
@ExcelCell(12)
private String tp;
@ExcelCell(13)
private Integer pasajeros;
@ExcelCell(14)
private Integer puertas;
// todo Zonedateime
// todo BigDecimal
}
please see this repo https://github.com/dacopan/poiji-error-demo
in Test package you can change autos2
and autos3
both show strange error derivated of the reported error
Note.- Sorry by the bad code, it's a starter library I'm testing
thank you @dacopan , I see what It causes!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@ozlerhakan any news on this? I'm also getting an ArrayIndexOutOfBoundsException: Attempt to modify attribute at illegal index 3
when using disableXLSXNumberCellFormat()
to parse into a double
.
Hi @falko , could you please share with me your excel file and model class?