使用VB将Excel传输到SQL [英] Excel transfer to SQL using VB

查看:81
本文介绍了使用VB将Excel传输到SQL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个应用程序,我通过adp文件将excel文件传输到SQL上的表。 excel文件确实发生了变化,因此我从cmd行传递了name参数。 excel文件具有20,000个记录的特定范围。目前该过程正在使用ac.DoCmd.TransferSpreadsheet acImport,它会提取所有30,000条记录,即使所有20,000条记录中都没有数据(大量空值)。如何让进程只传输不为空的数据?


谢谢。

Hi,
I have an application where I transfer an excel file to a table on SQL through an adp file. The excel file does change so I pass the name parameter from a cmd line. The excel file has a specific range defined of 20,000 records. Currently the process is using ac.DoCmd.TransferSpreadsheet acImport and it pulls in all 30,000 records even though there isn''t data in all 20,000 records (lots of nulls). How can I get the process to only transfer the data where it isn''t null?

Thanks.

推荐答案

你好,


我觉得"空"当涉及逗号分隔的.txt,.csv格式文件时,问题就得到了解决。试一试..祝你好运我的fren ..
hi there,

wll i feel the "null" problem is taken care of when it comes to comma delimited .txt, .csv format file.. give it a try.. good luck my fren..


VB可以使用NZ()函数,你看过吗?
VB can use the NZ() function, have you looked into that?


你把它放在代码中的哪个位置?
Where do you place this in the code?


这篇关于使用VB将Excel传输到SQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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