public static void ExportExcel() { string excelName = "william_test.xlsx"; string sheetName = "randomTest"; string path = Application.dataPath + "/" + excelName; ExcelAccess.WriteExcel(excelName, sheetName, path); AssetDatabase.Refresh(); Debug.Log("ExportExcel Success!"); }
IEnumerator StartAnalyze() { DirectoryInfo directoryInfo = new DirectoryInfo(FX_PATH); FileInfo[] files = directoryInfo.GetFiles("*.prefab", SearchOption.AllDirectories); while (mReportList.Count < files.Length) { if (!isCoroutineRunning) { string fxPath = files[mReportList.Count].DirectoryName.Substring(files[mReportList.Count].DirectoryName.LastIndexOf("Assets")); fxPath.Replace("\\", "/"); fxPath = fxPath + "/" + files[mReportList.Count].Name; this.transform.name = string.Format("Analyzing...({0}/{1})", mReportList.Count, files.Length); yield return(StartCoroutine(AnalyzeSingleFx(fxPath))); } } ExcelAccess.WriteExcel(mReportList, ExcelAccess.FilePath("EffectReportTool/EffectReport.xlsx")); AssetDatabase.Refresh(); }
public static void XieRu() { string[] strs; TextAsset ta = Resources.Load("ComponentColor2") as TextAsset; JsonData jd = JsonMapper.ToObject(ta.ToString()); strs = new string[jd.Count]; for (int i = 0; i < jd.Count; i++) { strs[i] = jd[i]["name"].ToString(); } for (int j = 0; j < strs.Length; j++) { for (int k = j + 1; k < strs.Length; k++) { if (strs[j] == strs[k]) { Debug.Log(strs[k]); } } } ExcelAccess.WriteExcel(strs, "ww.xlsx", "www"); }