请帮助您从查询结果中创建Excel文件 [英] Please help with creating excel file from query results

查看:139
本文介绍了请帮助您从查询结果中创建Excel文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我有一张桌子,我想从中创建一个Excel文件。我的查询如下:



插入OPENROWSET('Microsoft.ACE.OLEDB.12.0',

'Excel 12.0; Database = D:\testing.xlsx;',

'SELECT * FROM [Sheet1 $]')

select * from PAYHISTTEMP



我的错误是:

消息7403,级别16,状态1,行1

OLE DB提供程序Microsoft.ACE.OLEDB.12.0尚未注册。



我尝试过:



insert进入OPENROWSET('Microsoft.ACE.OLEDB.12.0',

'Excel 12.0; Database = D:\testing.xlsx;',

'SELECT * FROM [ Sheet1 $]')

选择*来自PAYHISTTEMP



我的错误是:

消息7403,等级16 ,状态1,第1行

OLE DB提供程序Microsoft.ACE.OLEDB.12.0尚未注册。

Hi there I have a table which I would like to create an Excel file from. My query is as follows:

insert into OPENROWSET('Microsoft.ACE.OLEDB.12.0',
'Excel 12.0;Database=D:\testing.xlsx;',
'SELECT * FROM [Sheet1$]')
select * from PAYHISTTEMP

My error is:
Msg 7403, Level 16, State 1, Line 1
The OLE DB provider "Microsoft.ACE.OLEDB.12.0" has not been registered.

What I have tried:

insert into OPENROWSET('Microsoft.ACE.OLEDB.12.0',
'Excel 12.0;Database=D:\testing.xlsx;',
'SELECT * FROM [Sheet1$]')
select * from PAYHISTTEMP

My error is:
Msg 7403, Level 16, State 1, Line 1
The OLE DB provider "Microsoft.ACE.OLEDB.12.0" has not been registered.

推荐答案

' )

选择*来自PAYHISTTEMP



我的错误是:

Msg 7403,Leve l 16,状态1,第1行

OLE DB提供程序Microsoft.ACE.OLEDB.12.0尚未注册。



我尝试了什么:



插入OPENROWSET('Microsoft.ACE.OLEDB.12.0',

'Excel 12.0;数据库= D:\testing.xlsx;',

'SELECT * FROM [Sheet1
')
select * from PAYHISTTEMP

My error is:
Msg 7403, Level 16, State 1, Line 1
The OLE DB provider "Microsoft.ACE.OLEDB.12.0" has not been registered.

What I have tried:

insert into OPENROWSET('Microsoft.ACE.OLEDB.12.0',
'Excel 12.0;Database=D:\testing.xlsx;',
'SELECT * FROM [Sheet1


')

从PAYHISTTEMP中选择*



我的错误是:

Msg 7403,Level 16,State 1,Line 1

OLE DB提供程序Microsoft.ACE.OLEDB.12.0尚未注册。
')
select * from PAYHISTTEMP

My error is:
Msg 7403, Level 16, State 1, Line 1
The OLE DB provider "Microsoft.ACE.OLEDB.12.0" has not been registered.


我假设您已在计算机上安装了适当的驱动程序。请看下面的文章,即使文章谈到导入数据,这将有助于您找到问题的相关信息。



SQL SERVER - FIX - 导出错误 - 'Microsoft.ACE.OLEDB.12.0'提供程序未在本地计算机上注册 - 带有Pinal Dave的SQL权限
I assume you have already installed appropriate drivers on your machine. Take look at the below article, even though the article talks about importing data this would help you in finding relative information to your issue.

SQL SERVER - FIX - Export Error - 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine - SQL Authority with Pinal Dave


这篇关于请帮助您从查询结果中创建Excel文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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