在asp.net中将xslt转换为excel [英] xslt to excel in asp.net

查看:92
本文介绍了在asp.net中将xslt转换为excel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须从asp.net页面导出到excel.我想采用xml/xsl到excel的路径,而不是datagrid导出.在Web中,我知道如何做到这一点.在此处输入链接描述我想知道如何使用列跨度,颜色,行跨度等来格式化xsl.

I have to Export to excel from my asp.net page.I want to take the route of xml/xsl to excel instead of datagrid export.In the web I got how to do that. enter link description here I like to know how to format the xsl with column span,colours,row span etc..

<Table>
        <Row>
            <Cell><Data ss:Type="String">Row 1, Col 1</Data></Cell>
            <Cell><Data ss:Type="String">Row 1, Col 2</Data></Cell>
            <Cell><Data ss:Type="String">Row 1, Col 3</Data></Cell>
            <Cell><Data ss:Type="String">Row 1, Col 4</Data></Cell>
       </Row>

xsl就像上面一样,我想知道如何进行格式化列的跨度,赋予颜色等...任何可用的文档.如果我在excel中加载时以html格式给出普通的xsl,则不会显示.

The xsl is like above I like to know how to do the formatting columnspan,giving colors etc...any document available.If i give plain xsl with html formatting when I load in excel it's not showing.

推荐答案

我不知道这对您有多大帮助,但是请尝试将Excel工作表保存为xml电子表格2007/2010格式.然后尝试使用记事本打开它,您可以看到源代码.另外,如果您尝试在记事本中进行任何修改,您都会在excel工作表中看到输出.

I don't know how much will this be helpful but try to save your excel sheet into xml spreadsheet 2007/2010 format. and then try to open it using notepad, you can see the source code. also that if you try to modify anything inside the notepad, you'll see the output in the excel sheet.

这篇关于在asp.net中将xslt转换为excel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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