Excel中建表语句的语法是什么?
我正在使用 ODBC,如果需要将大约 3 种不同类型的数据转储到不同的 Excel 工作表,则可以使用 OLE。 但我相信,要在 Excel 中使用插入语句,必须首先创建表,尤其是在工作表尚不存在的情况下。
我曾经使用sql server 2000的导入/导出向导来自动生成建表语句。
那么有谁知道 create 语句的数据类型和语法或 excel sql create 语句的良好资源的位置?
I'm using ODBC, OLE is available if needed to dump approx 3 different types of data to different excel sheets. But to use insert statements in excel, the table has to be created first I believe, especially if the sheet doesn't exist yet.
I used to use sql server 2000's import/export wizard that automatically generated the create table statement.
So does anyone know the data types, and syntax for a create statement or the location of a good resource for excel sql create statements?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在这里尝试:在 VBA 中使用 SQL
Try here: Using SQL in VBA
因此,这很容易找到,这里有一个来自 Leonel Martins 链接的示例:
另外值得注意的是,对于文本和日期时间,它似乎想要将数据包装在特殊字符中:
我可以发誓还有更多类型,例如 char 和 varchar
So that this is easy to find here's an example from Leonel Martins' Link:
Also of note is that for text and datetime it appears to want to wrap data in a special character:
I could swear there were more types, like char and varchar
该表上给我的创建表语法失败并显示以下消息
无法修改表“数据”的设计,它是只读数据库。
使用 OleDb 这有效:
但由于某种原因未能使用 odbc 表示只读。
The create table syntax given to me on that sheet failed with the message
Could not modify the design of table 'Data' it is a read-only database.
Using OleDb This worked:
but for some reason failed saying read-only using odbc.