惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V2EX - 技术
V2EX - 技术
酷 壳 – CoolShell
酷 壳 – CoolShell
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
阮一峰的网络日志
阮一峰的网络日志
GbyAI
GbyAI
The Cloudflare Blog
小众软件
小众软件
MyScale Blog
MyScale Blog
IT之家
IT之家
H
Help Net Security
宝玉的分享
宝玉的分享
V
Visual Studio Blog
Hugging Face - Blog
Hugging Face - Blog
F
Fortinet All Blogs
博客园_首页
S
SegmentFault 最新的问题
MongoDB | Blog
MongoDB | Blog
The Hacker News
The Hacker News
有赞技术团队
有赞技术团队
Microsoft Security Blog
Microsoft Security Blog
Know Your Adversary
Know Your Adversary
Project Zero
Project Zero
P
Palo Alto Networks Blog
博客园 - 聂微东
罗磊的独立博客
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Engineering at Meta
Engineering at Meta
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
U
Unit 42
Spread Privacy
Spread Privacy
NISL@THU
NISL@THU
Cisco Talos Blog
Cisco Talos Blog
Last Week in AI
Last Week in AI
L
Lohrmann on Cybersecurity
J
Java Code Geeks
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Cyberwarzone
Cyberwarzone
G
Google Developers Blog
C
Cybersecurity and Infrastructure Security Agency CISA
大猫的无限游戏
大猫的无限游戏
Microsoft Azure Blog
Microsoft Azure Blog
L
LangChain Blog
The GitHub Blog
The GitHub Blog
Jina AI
Jina AI
Blog — PlanetScale
Blog — PlanetScale
C
Cyber Attacks, Cyber Crime and Cyber Security
L
LINUX DO - 热门话题
T
Tailwind CSS Blog
雷峰网
雷峰网
C
Cisco Blogs

博客园 - 青松阳光

SharePoint 2013 & Office 365 新版本功能列表 Windows PowerShell for SharePoint Command Builder SharePoint Server 2013 RTM 开发测试虚拟机部署文档 SharePoint Reaches RTM! SharePoint 2013 Designer 去掉Design View的原因,官方有了正式的解释 Office 365 Enterprise Preview SharePoint Server 2013 Preview 新变化 SharePoint Server 2013 Preview虚拟机安装步骤文档 Office 2013 和 SharePoint 2013开发学习视频 开发自定义字段时一定要注意复合控件的ID问题 彻底解决SharePoint开发Debug中弹出的IIS Ping超时问题 推荐两本SharePoint2010开发必看的书籍 Office Web App 安装完之后发现在线查看Word或者PPT发生错误解决方案 MSDN针对SharePoint 2010提供了101个解决方案示例代码供下载 2010 Information Worker Demonstration and Evaluation Virtual Machine (SP1) 提供下载 在SharePoint中服务器端使用Word编程模型转换PDF遇到的问题以及解决方法 Thinkpad T410 安装Windows Server 2008 R2 启用Hyper-v蓝屏故障解决方法 Visual Studio 2008 Extensions for Windows SharePoint Services 3.0(VSeWSS) 1.3版本发布 SPDisposeCheck 工具新版本发布
使用XSLT和XML创建Excel
青松阳光 · 2011-09-15 · via 博客园 - 青松阳光

Posted on 2011-09-15 12:37  青松阳光  阅读(1702)  评论(1)    收藏  举报

在做SharePoint开发时,有时候会要求将SPGridView或者用表格(System.Web.UI.WebControls.Table)展示的数据导出为Excel。 如果使用SPGridView且不分页我们可以轻松得将其展示数据导出为Excel,具体做法参考这里。如果SPGridView做在了Web部件里,就很难使用这样的技术了,因为我们无法去重载Web部件所在的Page的VerifyRenderingInServerForm以防止导出时产生异常。另外如果我们用代码自己画出来的稍微复杂的报表要求导出为Excel时就很难借助SPGridView了。使用XSLT和XML来创建Excel可以满足灵活的表格展现样式,我写了个文档详细介绍了开发步骤,希望能给大家带来帮助。