调用System.Windows.Forms DLL 首先在Unity新建Plugins文件夹添加System.Windows.Forms.dll 然后代码中添加引用 using System; using UnityEngine; using System.Collections; using System.Collections.Generic; using System.Windows.Forms; using System.IO; public class FileMenu : Mono
Unity用Excel.dll简单读取Excel内容 需要Excel.dll 需要如下三个命名空间 using System.IO; using Excel; using System.Data; 1.新建Excel文件,并添加到Unity工程 这里新建的文件名为test.xml 2.创建一个C#脚本 using System.Collections; using System.Collections.Generic; using UnityEngine; using System.IO; us
1.引用Microsoft.Office.Interop.Excel.dll 2.引用命名空间.使用别名 using System.Reflection; using Excel = Microsoft.Office.Interop.Excel; 3.写入excel 写入函数 public void ToExcel(string strTitle) { int nMax = 9; int nMin = 4; int rowCount = nMax - nMin + 1;//总行数 const i