使用C#将TreeView转换为Excel [英] TreeView to Excel using c#

查看:52
本文介绍了使用C#将TreeView转换为Excel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我之前曾问过一个问题 关于如何获取excel数据并将其放入一个winforms树视图,该树视图可以正常工作,而我做到了,因此您可以对树视图进行更改,例如向其添加新节点.我想做的就是将其导出到我为此导出创建的工作表中.有任何想法或链接吗?

I asked a question previously on how to take excel data and put it into a winforms treeview, the treeview works properly and I made it so you can make changes to the treeview such as adding new nodes to it. What I would like to do is export this into the sheet that I created for this export. Any ideas or links?

谢谢.

推荐答案

如果要解决此问题,我可能会将树形视图转换为XML,然后通过定期打开文件来加载xml.如果我对您希望excel文件出现的方式以及要从树状视图中尝试保留的信息有更多了解,我可能会给出更全面的答案.

If I were approaching this problem I would probably convert the tree view into XML and then load the xml in by opening the file regularly. If I knew more about the way you wanted your excel file to appear and what sort of information you are trying to retain from your treeview I could probably give a more comprehensive answer.

其他人的例子:

http://www.codeproject.com/KB/cpp/treeviewtoxml.aspx

http://www.brainbell.com/tutorials/ms-office/excel/Load_An_XML_Document_Into_Excel.htm

这篇关于使用C#将TreeView转换为Excel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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