c#npoi 报错Cannot get a numeric value from a text cell 的解决
一般是因为cell里边的值为数字导致,有时变成文本格式还是解决不了这个问题.
下边的代码是c# 改变设置cell类型的方法 是用这个参数 CellType.String
Row.GetCell((int)customer_level_index).SetCellType(CellType.String);
detail.customer_level = Row.GetCell((int)customer_level_index).StringCellValue;
这个下边是网上的
POI 实际上setCellValue的时候根据传入参数的类型会自动设置celltype,所以
long vll = Long.valueOf(vls.trim());
//sheet.getRow(i).getCell(j).setCellType(Cell.CELL_TYPE_NUMERIC); 要mark掉,否则有异常
sheet.getRow(i).getCell(j).setCellValue(vll);
c#npoi 报错Cannot get a numeric value from a text cell 的解决的更多相关文章
- 搭建elsticsearch集群 报错with the same id but is a different node instance解决办法
搭建elsticsearch集群 报错with the same id but is a different node instance解决办法 学习了:https://blog.csdn.net/q ...
- (转)启动网卡报错(Failed to start LSB: Bring up/down networking )解决办法总结
启动网卡报错(Failed to start LSB: Bring up/down networking )解决办法总结 原文:http://blog.51cto.com/11863547/19059 ...
- MySQL8.0报错Can't connect to MySQL server on 'localhost' (10061)的解决办法
MySQL8.0报错Can't connect to MySQL server on 'localhost' (10061)的解决办法 事情的起因 今天课堂上要展示小组项目,需要用一个软件叫W ...
- SpringBoot2整合Shiro报错 UnavailableSecurityManagerException: No SecurityManager accessible to the calling code 【已解决】
SpringBoot集成Shiro报错 UnavailableSecurityManagerException: No SecurityManager accessible to the callin ...
- CURL命令报错:dyld: lazy symbol binding failed: Symbol not found: _SSL_load_error_strings解决办法
Mac OS X 10.11.6, curl 命令报错,错误如下: dyld: lazy symbol binding failed: Symbol not found: _SSL_load_erro ...
- ubuntu 修改保存报错E37:No write since last change(add ! to override)的解决方法
报错信息如下: E37: No write since last change (add ! to override) 解决办法是: 在修改完后,将命令 :q 改成 :wq 即可.
- Vmware出现报错The VMware Authorization Service is not running.之后无法上网解决
今天一大早开VMware,启动ubuntu时出现了报错The VMware Authorization Service is not running,服务Authorization没有运行. 这之前一 ...
- linux【报错】userdel: user xiaoming is currently used by process 4713解决
学习linux的初学者肯定会遇到一些莫名其妙的问题,比如我,在学习删除一个用户的时候,就遇到上面的报错 userdel: user xiaoming is currently used by proc ...
- (原创)vagrant up 异常报错,出现 There was an error while executing `VBoxManage` 的解决方法
最近在使用 vagrant homestead 时,不小心在虚拟机上使用了 exit 命令退出虚拟机,导致再使用 vagrant up 时出现以下错误: Bringing machine 'larav ...
随机推荐
- [转]vs2010用 boost.python 编译c++类库 供python调用
转自:http://blog.csdn.net/wyljz/article/details/6307952 VS2010建立一个空的DLL 项目属性中配置如下 链接器里的附加库目录加入,python/ ...
- 在宿主机查看docker使用cpu、内存、网络、io情况
命令: docker stats [OPTIONS] [CONTAINER...] 显示所有: docker stats -a
- AIOps指导
AIOps代表运维操作的人工智能(Artificial Intelligence for IT Operations), 是由Gartner定义的新类别,Gartner的报告宣称,到2020年, ...
- c++11 关于typelist的foreach
建好一个typelist,其中都是类型信息而已,很重要的一个应用,循环迭代干些事情. 看了下boost的for_each实现,用我自己的typelist,大概代码如下: template<typ ...
- 减小delphi体积的方法
1.关闭RTTI反射机制 自从Delphi2010中引入了新的RTTI反射机制后,编译出来的程序会变得很大,这是因为默认情况下 Delphi2010 给所有类都加上了反射机制.而我们的工程并不每每都 ...
- [UE4]Slider
Slider:滑动条 一.Slider.Bar Thickness:滑动条厚度 二.Slider.Appearance.Step Size:每次滑动的步进值 三.Slider.Appearance.V ...
- java中拼接两个对象集合
目标: 根据两个list中每条记录的某个属性是否相同来拼接. 1.首先定义一个字符串 String str = "[{\"ITEMID\":2,\"ITEMN ...
- 4、Zookeeper简单介绍
一.分布式协调技术 在给大家介绍ZooKeeper之前先来给大家介绍一种技术——分布式协调技术.那么什么是分布式协调技术?那么我来告诉大家,其实分布式协调技术 主要用来解决分布式环境当中多个进程之间的 ...
- alertjs Documentation
原文地址:https://github.com/PaulNieuwelaar/alertjs/wiki/Documentation#alertshow For version 3.0 document ...
- List接口、Set接口和Map接口
1.List和Set接口继承自Collection接口,而Map不是继承的Collection接口 Map没有继承Collection接口,Map提供key到value的映射;一个Map中不能包含相同 ...