感谢Keith, 
我的简单工作就是为了这条消息 
我的课程表的代码是: 
			
			- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.IO;
- using System.Windows.Forms;
- using Autodesk.Civil.ApplicationServices;
- using acadApp = Autodesk.AutoCAD.ApplicationServices.Application;
- using Autodesk.Civil.DatabaseServices;
- using Autodesk.Civil.Settings;
- using Autodesk.Civil.Runtime;
- using Microsoft.Office.Interop.Excel;
- using Autodesk.AutoCAD.Runtime;
- namespace ClassLibrary9
- {
-     public class Class1
-     {
-         public class Commands
-         {
-             [CommandMethod("WriteToExcel")]
-             public void Test()
-             {
-                 String myString = "E,X,E,R,C,I,S,E";
-                 Array myArray = myString.Split();
-                 System.Windows.Forms.Application.EnableVisualStyles(); 
-                 System.Windows.Forms.Application.Run(new Form1());
-             }
-         }
-     }
- }
                               
 
 
表单1的代码是:
 - using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace ClassLibrary9
- {
-     public partial class Form1 : Form
-     {
-         public Form1()
-         {
-             InitializeComponent();
-         }
-         private void button1_Click(object sender, EventArgs e)
-         {
-             //Write function to writing myArray to an excel file.
-         }
-     }
- }
                       
 
  |