将数据导出到Excel并下载excel文件 [英] Export data to excel and download excel file

查看:191
本文介绍了将数据导出到Excel并下载excel文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在尝试将数据从数据集或数据表导出到excel并下载它。这是在我的本地机器上工作但是当我将项目部署到服务器端时我能够导出并在用户登录服务器时下载excel文件,但在用户注销时无法执行相同的操作。



我已经设置了



identity impersonate =trueusernname =xxxpassword =yyy



也在web.config文件中

即使我无法导出和下载excel文件。



所以请帮助我。

Hi,
I am trying to export data from dataset or datatable to excel and download it.This is working in my local machine but when i deployed the project to server side i am able to export and download the excel file when the user is logged in the server but couldnt perform the same operation when the user is logged out.

I have set the

identity impersonate="true" usernname="xxx" password="yyy"

also in web.config file
even though i couldnt export and download excel file.

so please help me.

推荐答案

您可以尝试为运行应用程序池的用户(网络服务?)提供对所需文件夹(读写)的完全访问权限。
You could try to give full access to the required folder(read-write), to the user who runs through the application pool(Network Service?)


这篇关于将数据导出到Excel并下载excel文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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