Excel异常Cannot get a text value from a numeric cell
POI操作Excel时数据Cell有不同的类型,当我们试图从一个数字类型的Cell读取出一个字符串并写入数据库时,就会出现Cannot get a text value from a numeric cell的异常错误,解决办法就是先设置Cell的类型,然后就可以把纯数字作为String类型读进来了:
if(row.getCell(7)!=null){
row.getCell(7).setCellType(Cell.CELL_TYPE_STRING);
stuUser.setPhone(row.getCell(7).getStringCellValue());
}
Excel异常Cannot get a text value from a numeric cell的更多相关文章
- 使用POI导入Excel异常Cannot get a text value from a numeric cell 解决
POI操作Excel时因为Excel数据Cell有不同的类型,会出现Cannot get a text value from a numeric cell的异常错误. 异常原因:Excel数据Cell ...
- Java使用POI导入Excel异常Cannot get a text value from a numeric cell 解决
异常原因:Excel数据Cell有不同的类型,当我们试图从一个数字类型的Cell读取出一个字符串并写入数据库时,就会出现Cannot get a text value from a numeric c ...
- POI操作Excel异常Cannot get a text value from a numeric cell
控制台抛出异常:java.lang.IllegalStateException: Cannot get a text value from a numeric cell 在java中用POI解析exc ...
- [转]Excel导入异常Cannot get a text value from a numeric cell解决
原文地址:http://blog.csdn.net/ysughw/article/details/9288307 POI操作Excel时偶尔会出现Cannot get a text value fro ...
- Excel导入异常Cannot get a text value from a numeric cell解决
POI操作Excel时偶尔会出现Cannot get a text value from a numeric cell的异常错误. 异常原因:Excel数据Cell有不同的类型,当我们试图从一个数字类 ...
- Excel导入异常Cannot get a text value from a numeric cell解决及poi导入时注意事项
POI操作Excel时偶尔会出现Cannot get a text value from a numeric cell的异常错误. 异常原因:Excel数据Cell有不同的类型,当我们试图从一个数字类 ...
- 异常Cannot get a text value from a numeric cell
POI操作Excel时偶尔会出现Cannot get a text value from a numeric cell的异常错误. 异常原因:Excel数据Cell有不同的类型,当我们试图从一个数字类 ...
- 使用poi读取excel文件 Cannot get a text value from a numeric cell
我这样转换得到一个excel文本域的值 Cell cell = row.getCell(c); cell.setCellType(Cell.CELL_TYPE_STRING); String park ...
- 解决C#导出excel异常来自 HRESULT:0x800A03EC的方法 .
解决C#导出excel异常来自 HRESULT:0x800A03EC的方法 . xlBook.SaveAs(FilePath,Microsoft.Office.Interop.Excel.XlFi ...
随机推荐
- Spring之Spring MVC
Spring调配半天没搞定,原来是web.xml应该放在WEB-INF的目录下,而不是webcontent目录下: java.lang.ClassNotFoundException: org.spri ...
- ∑–△型模数转换器(ADC)简介
∑–△型模数转换器(ADC) 1.概述 近年来,随着超大规模集成电路制造水平的提高,Σ-Δ型模数转换器正以其分辨率高.线性度好.成本低等特点得到越来越广泛的应用.Σ-Δ型模数转换器方案早在20世纪60 ...
- iOS面试题16719-b
1. 反转二叉树,不用递归 /*** Definition for a binary tree node.* public class TreeNode {* int val;* Tr ...
- HTML5之本地文件系统API - File System API
HTML5之本地文件系统API - File System API 新的HTML5标准给我们带来了大量的新特性和惊喜,例如,画图的画布Canvas,多媒体的audio和video等等.除了上面我们提到 ...
- Android之EditText组件学习
一.基础学习 1.Button是TextView的一个子类,所以按钮本身是一个特殊的文本,属性和TextView相似 2.EditText类似html里的input type="text&q ...
- jquery mobile backbone
http://www.appliness.com/getting-started-with-html-mobile-application-development-using-jquery-mobil ...
- C++小知识之Vector用法
tyle="margin:20px 0px 0px; font-size:14px; line-height:26px; font-family:Arial; color:rgb(51,51 ...
- XtraForm中OfficeSkins以及BonusSkin皮肤的设置
前提 http://www.cnblogs.com/chucklu/p/4786629.html 在上一篇文章的基础上,现在来使用其他主题的皮肤 一.其他皮肤主题 一共有3种类型的主题: 1.默认的 ...
- C#文本处理(String)学习笔记
摘要:string是编程中使用最频繁的类型.一个string表示一个恒定不变的字符序列集合.string类型直接继承自object,故他是一个引用类型,也就是说线程的堆栈上不会有任何字符串(直接继承自 ...
- ruby eclipse调试
rubyinstaller 1.9.3eclipse Keplermarketplace ruby dltk 5.0ruby devkit(Ruby 1.8.7 and 1.9.3) DevKit-t ...