使用Open XML创建excel [英] create excel with Open XML

查看:88
本文介绍了使用Open XML创建excel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要构建xml格式,因此它将在每个MS Excel中打开

我尝试使用"SpreadsheetDocument.Create",但它想创建一个文件,但是我不想创建文件.我想用它创建xml并将其发送给客户端,因此MS Excel将打开它.

我该怎么做?

谢谢

I need to build xml format, so it will opened with every MS Excel

I tried to using "SpreadsheetDocument.Create", but it wants to create a file, but I don''t want to create file. I want to create xml with it and send it to the client, so MS Excel will open it.

How I can do this??

Thank you

推荐答案

不需要魔术成分,也不需要使用Office自动化来创建XML文档.

这里是Excel中XML的简介 [
There is no magic ingredient required and you don''t need to use Office automation to create XML documents.

Here''s an intro to XML in Excel[^] (you should understand what it is you will end up with).

All that is required is that you have a valid, conforming XML file. The .NET framework will write this out for you from an object model (look for XML serialization in the .NET framework if you''re not familiar with the topic).

Hope this steers you in the right direction.

Cheers.


这篇关于使用Open XML创建excel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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