Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/excel/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
不在Java中打印excel工作表中的所有行值_Java_Excel_Selenium_Read Data - Fatal编程技术网

不在Java中打印excel工作表中的所有行值

不在Java中打印excel工作表中的所有行值,java,excel,selenium,read-data,Java,Excel,Selenium,Read Data,当我试图读取和打印excel工作表中的所有行值时,有一行值未打印,请检查以下代码 File src = new File("C:\\Users\\zuzu\\Desktop\\chat.xlsx"); FileInputStream fis = new FileInputStream(src); XSSFWorkbook wb = new XSSFWorkbook(fis); XSSFSheet sheet1= wb.getSheetAt(0); int rowcount = sheet1.g

当我试图读取和打印excel工作表中的所有行值时,有一行值未打印,请检查以下代码

File src = new File("C:\\Users\\zuzu\\Desktop\\chat.xlsx");
FileInputStream fis = new FileInputStream(src);
XSSFWorkbook wb = new XSSFWorkbook(fis);
XSSFSheet sheet1= wb.getSheetAt(0);

int rowcount = sheet1.getLastRowNum();

System.out.println("Total row is " +rowcount );
 for(int i=0;i<rowcount;i++)
            {
                String data0 =sheet1.getRow(i).getCell(0).getStringCellValue();
                System.out.println("values are "+data0);

            }

ram 6未打印

您的for语句中缺少一个相等项:

for(int i=0;i<=rowcount;i++)

   `

for(int i=0;i使用调试器找出发生了什么事而不是读取第7行的值抱歉,我的评论错了:使用调试器找出第7行的值的格式为何;是字符串还是其他格式?
for(int i=0;i<=rowcount;i++)

   `