在datagrid视图中加载错误的数据 [英] loading wrong data in datagrid view

查看:100
本文介绍了在datagrid视图中加载错误的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

am使用excel表格绘制图表,并在datagrid视图中将其加载到Visual Basic中.虽然成功,但是在将其加载到vb中时,excel表格中的数据以及在Visual Basic数据网格中显示的数据视图是不同的,即时间"列中的数据随着日期而变化.即,它显示该表中的其他日期以及时间.


时间
1899年12月30日下午3:29
1899年12月30日下午3:29
1899年12月30日下午3:30
1899年12月30日下午3:30
1899年12月30日下午3:30
1899年12月30日下午3:30
1899年12月30日下午3:30
1899年12月30日下午3:31
1899年12月30日下午3:31
1899年12月30日下午3:46
1899年12月30日下午3:46
1899年12月30日下午3:46
1899年12月30日下午3:46
1899年12月30日下午3:46
1899年12月30日下午3:46
1899年12月30日下午3:46
1899年12月30日下午3:46
1899年12月30日下午3:46

这就是它要显示的内容,但是excel工作表中的值是

时间
15:29:28
15:29:45
15:30:03
15:30:21
15:30:33
15:30:45
15:30:57
15:31:09
15:31:21
15:46:24
15:46:25
15:46:26
15:46:27
15:46:28
15:46:29
15:46:30
15:46:32
15:46:32
16:01:35
16:01:36
16:01:37
16:01:38

请帮忙,为什么它会这样显示..

am using excel sheet to draw chart for which am loading it in visual basic in datagrid view.and am succesful in that but while it is getting loaded in vb the data in excel sheet and the data that is displayed in visual basic datagrid view is different i.e the data in "time" column is getting changed with date.i.e it is showing some other date and also the time in that sheet.


Time
12/30/1899 3:29 PM
12/30/1899 3:29 PM
12/30/1899 3:30 PM
12/30/1899 3:30 PM
12/30/1899 3:30 PM
12/30/1899 3:30 PM
12/30/1899 3:30 PM
12/30/1899 3:31 PM
12/30/1899 3:31 PM
12/30/1899 3:46 PM
12/30/1899 3:46 PM
12/30/1899 3:46 PM
12/30/1899 3:46 PM
12/30/1899 3:46 PM
12/30/1899 3:46 PM
12/30/1899 3:46 PM
12/30/1899 3:46 PM
12/30/1899 3:46 PM

this is what it is getting displayed,but the values in excel sheet is

Time
15:29:28
15:29:45
15:30:03
15:30:21
15:30:33
15:30:45
15:30:57
15:31:09
15:31:21
15:46:24
15:46:25
15:46:26
15:46:27
15:46:28
15:46:29
15:46:30
15:46:32
15:46:32
16:01:35
16:01:36
16:01:37
16:01:38

plz help why it is showing like this..

推荐答案

问题出在1900年之前的日期
请参阅这些链接

http://www.exceluser.com/explore/earlydates.htm [ http: //www.daniweb.com/hardware-and-software/microsoft-windows/threads/104042/how-do-you-use-dates-before-1900-in-excel [
The problem is with the dates before year 1900
Refer these links

http://www.exceluser.com/explore/earlydates.htm[^]

http://www.daniweb.com/hardware-and-software/microsoft-windows/threads/104042/how-do-you-use-dates-before-1900-in-excel[^]


这篇关于在datagrid视图中加载错误的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆