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 ...
随机推荐
- maven 项目使用本地jar
<dependency> <groupId>com.yeepay.g3</groupId> <artifactId>yop</artifactId ...
- 从Firebird2.5 迁移到 Firebird3.0 手记
新血来潮的下了FB3.0,一试用发现不少问题,搞来搞去的把头都搞大了,写个笔头记念一下. 首先发现是FB2.5的数据库不能直接用在FB3.0上,看文档和群友指点,原来需要用FB2.5的gbak.exe ...
- Python 算术运算符
Python 算术运算符 运算结果为浮点数 除法:/ 整除: // 求余计算: % 求余运算可以用于固定时间的检测,比如说每10分钟进行一次什么样的操作,则:minute % 10 乘方运算:
- bzoj5049: 导航系统
Description 小Q来到了一个随机的国度.这个国度由n座城市和m条双向道路构成.因为这个国度崇尚随机,因此m条边是用随机 选择两端点的方式生成的.充满好奇的小Q想在这里进行k次随机的旅行,每次 ...
- iOS之iOS11、iPhone X、Xcode9 适配指南
更新iOS11后,发现有些地方需要做适配,整理后按照优先级分为以下三类: 1.单纯升级iOS11后造成的变化: 2.Xcode9 打包后造成的变化: 3.iPhoneX的适配 一.单纯升级iOS11后 ...
- Scala map与flatMap
1. map函数 对集合的每一个元素运用某个函数操作,然后将结果作为一个新的列表返回. 实例1:将列表中每个元素值乘以2 scala> val list1=List(1,2,3,4) lis ...
- [C#]WinForm 中 comboBox控件之数据绑定
[C#]WinForm 中 comboBox控件之数据绑定 一.IList 现在我们直接创建一个List集合,然后绑定 IList<string> list = new List<s ...
- oracle的权限和角色
1 介绍 这一部分我们主要看看oracle是如何管理权限和角色的,权限和角色的区别在哪里. 当刚刚建立用户时,用户没有任何权限,也不能执行任何操作.如果要执行某种特定的数据库操作,则必须为其授予系统 ...
- zabbix4.0下zabbix-agentd安装
转:http://www.safecdn.cn/monitor/2018/12/zabbix4-0-zabbix-agentd-install/316.html 一 安装源和Zabbix的依赖包: 1 ...
- 清除eclipse,STS workspace历史记录
记一下 打开eclipse下的/configuration/.settings目录 修改文件org.eclipse.ui.ide.prefs文件 把RECENT_WORKSPACES这项修改为你需要的 ...