2021年4月22日星期四

Why the last column is been ignored when i read my excell file?

good nigth!

I'm reading the first line of my excel file, and the last column is been ignored when return the array cells (i expect 66 columns, but i'm getting 65) at the line instruction: cells = sheet.getRow(linhaAtual). How can i fix it ?

I'm using the woorkbook from jxl libray, only that days ago this problem didn't happen, but today occured. I don't know if it can be a trace to this problem, but when sheet = workbook.getSheet(0); is executed, these warnings show on console:

Warning:  Cell BN1 exceeds defined cell boundaries in Dimension record (65x107)  Warning:  Cell BN2 exceeds defined cell boundaries in Dimension record (65x107)  and so on...  

I'm leaving the code snipped bellow used:

        //pega o arquivo Excel          workbook = Workbook.getWorkbook(stream);                    //pega a primeira planilha do arquivo xls          sheet = workbook.getSheet(0);          int numeroLinhas = sheet.getRows();                    for (int actualLine = 0; actualLine < numLines; numLines++) {              //when get the first line return a array of 65 (i expect 66[enter image description here][1])              cells = sheet.getRow(linhaAtual);          }  

My excell, the last column is been ignored, when i read the header line.

Excel photo

https://stackoverflow.com/questions/67222550/why-the-last-column-is-been-ignored-when-i-read-my-excell-file April 23, 2021 at 08:43AM

没有评论:

发表评论