void Write(string path) { string ext = Path.GetExtension(path); switch (ext) { case ExtType.csv: CSVHelper.LoadData(path, savePath, namepace); break; case ExtType.excel: ExcelHelper.LoadData(path, savePath, namepace); break; default: Debug.LogError("获取文件后缀错误" + path); break; } }