简单的问题都有分啊!!!!大家都进啊,哈哈哈

sirious 2005-05-13 11:16:50
怎么样把EXCEL中数据导入ACCESS?最好有关键代码?谢谢
...全文
85 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
wslz2001 2005-05-14
  • 打赏
  • 举报
回复
SELECT * FROM [;database=C:\db2.mdb;pwd=1].某表 AS 别名表 WHERE ……

--------------------------------------------------------------------------------
关于文本文件可以这样:
select * from [Text;FMT=Delimited;HDR=Yes;DATABASE=C:\;].[aparm#txt];

关于Excel可以这样:
insert into 表 SELECT * FROM [Excel 5.0;HDR=YES;DATABASE=c:\test.xls].[sheet1];


--------------------------------------------------------------------------------
Example 1
The following SQL code shows you how to export a table to a text file:
SELECT * INTO
[Text;FMT=Delimited;HDR=Yes;DATABASE=C:\TEMP;].[OutCustomers#txt]
FROM Customers;

Example 2
The following SQL code shows you how to import a table from a text file (this is the one created in the first example): SELECT * INTO ImpCustomers
FROM [Text;FMT=Delimited;HDR=Yes;DATABASE=C:\TEMP;].[OutCustomers#txt];

Example 3
To modify the SQL statement so that it exports the data in Unicode text format, add the following option to the connection argument: CharacterSet=Unicode

For example, you can modify the statement in Example 1 to the following:
SELECT * INTO
[Text;FMT=Delimited;HDR=Yes;DATABASE=C:\TEMP;CharacterSet=Unicode].[OutCustomersUNI#txt]
FROM Customers;
--------------------------------------------------------------------------------
tztz520 2005-05-13
  • 打赏
  • 举报
回复
http://community.csdn.net/Expert/FAQ/FAQ_Index.asp?id=159716
sirious 2005-05-13
  • 打赏
  • 举报
回复
不行啊
提示找不到可安装的ISAM!
帮帮忙啊?

2,462

社区成员

发帖
与我相关
我的任务
社区描述
VBA(Visual Basic for Applications)是Visual Basic的一种宏语言,是在其桌面应用程序中执行通用的自动化(OLE)任务的编程语言。
社区管理员
  • VBA
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧