Cannot get a numeric value from a text cell 在往系统中导入EXCEL的时候有一整篇报错,提示:javax.servlet.ServletException:java.lang.IllegalStateException:Cannot get a numeric value from a text celldescription The server encountered an
来源:学生作业帮助网 编辑:作业帮 时间:2024/06/21 11:38:00
![Cannot get a numeric value from a text cell 在往系统中导入EXCEL的时候有一整篇报错,提示:javax.servlet.ServletException:java.lang.IllegalStateException:Cannot get a numeric value from a text celldescription The server encountered an](/uploads/image/z/7894317-21-7.jpg?t=Cannot+get+a+numeric+value+from+a+text+cell+%E5%9C%A8%E5%BE%80%E7%B3%BB%E7%BB%9F%E4%B8%AD%E5%AF%BC%E5%85%A5EXCEL%E7%9A%84%E6%97%B6%E5%80%99%E6%9C%89%E4%B8%80%E6%95%B4%E7%AF%87%E6%8A%A5%E9%94%99%2C%E6%8F%90%E7%A4%BA%EF%BC%9Ajavax.servlet.ServletException%3Ajava.lang.IllegalStateException%3ACannot+get+a+numeric+value+from+a+text+celldescription+The+server+encountered+an)
Cannot get a numeric value from a text cell 在往系统中导入EXCEL的时候有一整篇报错,提示:javax.servlet.ServletException:java.lang.IllegalStateException:Cannot get a numeric value from a text celldescription The server encountered an
Cannot get a numeric value from a text cell
在往系统中导入EXCEL的时候有一整篇报错,提示:javax.servlet.ServletException:java.lang.IllegalStateException:Cannot get a numeric value from a text cell
description
The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException:java.lang.IllegalStateException:Cannot get a numeric value from a text cell
Cannot get a numeric value from a text cell 在往系统中导入EXCEL的时候有一整篇报错,提示:javax.servlet.ServletException:java.lang.IllegalStateException:Cannot get a numeric value from a text celldescription The server encountered an
Excel数据Cell有不同的类型,当读取数据并写入数据库时,如果数据类型不匹配,就会报出相关异常.
你的这个异常就是不能将单元格的类型转换成numberic,所以需要你人工处理
row.getCell(0).setCellType(CELL_TYPE_NUMERIC); //将数据类型设置为numberic
然后再去读取相应的值就可以了