public static DataRowCollection GetCollection(string excelName) { #if SERVER Singleton._log.Info("ExcelAccess file path=" + ExcelAccess.FilePath(excelName)); #endif FileStream stream = File.Open(ExcelAccess.FilePath(excelName), FileMode.Open, FileAccess.Read, FileShare.Read); IExcelDataReader excelReader = ExcelReaderFactory.CreateBinaryReader(stream); DataSet result = excelReader.AsDataSet(); return(result.Tables[0].Rows); }
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(); }