0

有没有办法在浏览器中做到这一点?(没有自动化工厂)

我知道我可以很好地导出为 CSV,但我想将我的 Silverlight 数据网格导出为 Excel (.xls) 文档,并设置了一些行的背景颜色。

4

3 回答 3

0

我发现这个指南几乎是我需要的,虽然它并不优雅。基本上,循环并将所有行打印为 XML 格式。我觉得很奇怪微软不会提供一个浏览器内的方法来导出到 Excel 格式,我们需要做这样的事情

http://www.codeproject.com/Articles/45731/Export-Silverlight-DataGrid-to-Excel-XML-CSV

于 2012-12-20T17:26:57.487 回答
0

If you want to interact with MS Excel using Silverlight CLR - it is the only way to use AutomationFactory (becouse of silverlight pesmission restrictions). Ms Excel should be installed on client machines. But you can also pass data to web-service, process it, and return excel sheet as byte array.

I suggest you use the second way.

于 2012-12-19T10:20:15.780 回答
0

从 silverlight 导出网格到 excel mht 将适用于任何颜色和格式。

于 2012-12-24T10:38:09.620 回答