gpt4 book ai didi

sql - 将数据从 SQL Server 表导出到现有 EXCEL 文件

转载 作者:行者123 更新时间:2023-12-04 06:18:33 26 4
gpt4 key购买 nike

insert into OPENROWSET('Microsoft.Jet.OLEDB.4.0', 
'Excel 8.0;Database=D:\contact.xls;',
'SELECT * FROM [$Sheet1]')
select * from Persons

此代码不起作用..它给出了错误
OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)" returned 
message "The Microsoft Jet database engine could not find the object '$Sheet1'.
Make sure the object exists and that you spell its name and the path
name correctly.".
Msg 7350, Level 16, State 2, Line 2
Cannot get the column information from OLE DB provider "Microsoft.Jet.OLEDB.4.0"
for linked server "(null)".

请帮忙

最佳答案

原来The Microsoft Jet database engine could not find the object '$Sheet1' ,所以你应该 Make sure the object exists and that you spell its name and the path name correctly .

关于sql - 将数据从 SQL Server 表导出到现有 EXCEL 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6911210/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com