vb.net - 使用 vb.net 或 sql 将值格式转换为其原始格式
问题描述
我在 excel (.csv) 中有一个帐号,我将其读入数据表。帐号5.01E+13
在 excel 中显示,因此将其读取到数据表中。而原始值为50100393946569
。我需要将 Excel 中的帐号与存储在数据库中的帐号进行比较。如何在 VB 或 SQL 中5.01E+13
恢复其原始格式50100393946569
下面是读取excel到数据表的代码
Dim sreader as StreamReader
Dim sstring as String
Dim dt as DataTable
Sreader = File.OpenText(Path.ToString) 'this path is path of the excel
While sreader.Peek <> -1
sstring = sreader.Readline
Dim str as String () = sstring.split(",")
Dim rowdt as DataRow
rowdt = dt.NewRow()
For i as Integer = 0 to dt.Columns.count-1
rowdt(i) = str(i).ToString
Next
dt.rows.add(rowdt)
End while
解决方案
推荐阅读
- java - Tink 中的多个私钥/公钥对
- time-series - 时间序列:HBase vs OpenTSDB/KDB 用于有条件的范围查询
- r - 为什么'theDate'打印出来十年?
- python - Python:在文本文件中,如何根据模式对先前重复的行进行分组?
- react-native - Reg: wdio iOS和Android原生应用程序之间的通用定位器,使用ReactNative开发(除了AccessibilityID)
- python - 需要使用带有 Uplink 的动态参数来扭曲返回分页结果的 API
- spring - 春季启动时延迟初始化获取失败
- php - 如何重写这样的 URL (localhost/mvc/public/index.php?url=watch?v=ohGXBKUkK4c)?
- javascript - React history.push 重新加载组件。希望它只加载一次
- wordpress - 联系表格 7 将图像添加到每个无线电输入