使用excel值生成图形 [英] generating graph using excel values

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

问题描述

嘿,我想创建一个网页应用程序,我希望使用excel表中的数据在asp.net页面中生成图形。然后必须将生成的图形导出为pdf和word。

任何plz共享代码和帮助。



谢谢

Hey i want to create a web page application where in I want to generate a graph in asp.net page using the data from excel sheet. The generated graph must then be exported to pdf and word.
Anyone plz share code and help.

Thanks

推荐答案

您可以使用Open XML SDK实现Excel和Word功能:

http://www.microsoft.com/en-us/download/details.aspx?id=30425 [ ^ ]。



这样,您就可以支持新的基于XML的Office格式(例如.DOCX,.XLSX),ECMA-376标准:

http://en.wikipedia.org/wiki/Microsoft_Office_XML_formats [ ^ ],

http://en.wikipedia .ORG /维基/ Office_Open_X ML [ ^ ]。



这样,您可以在没有安装Office的情况下工作。此外,第三方软件支持这些文档。请查看我过去的答案:

将Office文档转换为PDF而不互操作 [ ^ ],
需要一个相当独特的WPF文本编辑器控件 [ ^ ],

您好如何使用c#.net 在Windows应用程序中显示word文件[ ^ ],

阅读没有使用Interop.word dll的word文件...不想在IIS中安装单词。 [ ^ ]。



这是另一种选择: http://npoi.codeplex.com/ [ ^ ]。



另一种选择是使用Office Interop程序集,但它需要在目标计算机上安装Office组件。



最后,当您设法从Office文档获取数据时,您可以将其映射到PDF结构。要生成PDF本身,你可以真正使用iText的.NET端口;这个端口叫做iTextSharp:

http://en.wikipedia.org/wiki/IText [ ^ ],

http://itextpdf.com/ [ ^ ],

http://sourceforge.net/projects/itextsharp/ [ ^ ]。



我也提供了iText的链接,因为几乎所有使用iTextSharp的文档都在那里,以Java文档的形式提供。



-SA
You can implement both Excel and Word functionality using Open XML SDK:
http://www.microsoft.com/en-us/download/details.aspx?id=30425[^].

This way, you can support new XML-based Office formats (such as .DOCX, .XLSX), ECMA-376 standard:
http://en.wikipedia.org/wiki/Microsoft_Office_XML_formats[^],
http://en.wikipedia.org/wiki/Office_Open_XML[^].

This way, you can work without Office installed. Also, the documents are supported by 3rd-party software. Please see my past answers:
Convert Office-Documents to PDF without interop[^],
Need a rather unique WPF text editor control[^],
Hi how can i display word file in windows application using c#.net[^],
Read a word file without using Interop.word dll...Do not want to install word in IIS..[^].

This is another option: http://npoi.codeplex.com/[^].

Another option is to use Office Interop assemblies, but it will require installed Office components on the target computer.

And, finally, when you manage to get data from Office documents, you can map it onto PDF structure. To produce PDF itself, you can really use the .NET port of iText; this port is called iTextSharp:
http://en.wikipedia.org/wiki/IText[^],
http://itextpdf.com/[^],
http://sourceforge.net/projects/itextsharp/[^].

I provided links to iText, too, because nearly all documentation you need to work with iTextSharp is there, provided as Java documentation.

—SA


尝试 Excel C#应用程序中的图表 [ ^ ]。


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

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