简体   繁体   English

C#类,导出到Excel

[英]C# Classes, export to Excel

Is it possible to export my classes to excel? 是否可以将我的课程导出到Excel?

I need to have class name with all properties. 我需要具有所有属性的类名。 I have Resharper and VS 2015 on my system. 我的系统上装有Resharper和VS 2015。

I've searched this before and found this How Can I export the list of classes from a Visual studio 2008 solution which is not my case. 我之前进行过搜索,找到了“ 如何从Visual Studio 2008解决方案中导出类列表”,这不是我的情况。

I would prefer to have each class in a sheet and the properties as rows of the sheet if possible. 我希望将每个类都放在工作表中,并将属性尽可能地放在工作表的行中。

PS: I know how to do it pro grammatically. PS:我知道该怎么做,以编程的方式。 I am looking for a way to do this simple task using Visual Studio. 我正在寻找一种使用Visual Studio完成此简单任务的方法。 This is not the functionality of my project, so it is not a good idea 这不是我项目的功能,所以不是一个好主意

Follow these links To get all classes : 点击以下链接获得所有课程:

How to get all classes within namespace? 如何在命名空间中获取所有类?

Get the property list from each class using Reflaction 使用Reflaction从每个类获取属性列表

How to get the list of properties of a class? 如何获取类的属性列表?

After that search for export to excel. 之后,搜索导出到excel。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM