|
|
@@ -1,10 +1,10 @@
|
|
|
using System.Collections;
|
|
|
using System.Collections.Generic;
|
|
|
-using UnityEngine;
|
|
|
using OfficeOpenXml;
|
|
|
using System.IO;
|
|
|
using System;
|
|
|
using SimpleJSON;
|
|
|
+using System.Diagnostics;
|
|
|
|
|
|
/*使用方法
|
|
|
using System.IO;
|
|
|
@@ -43,18 +43,18 @@ public class ExcelEditor
|
|
|
{
|
|
|
ExcelWorksheet worksheet = package.Workbook.Worksheets[oldSheetName];
|
|
|
worksheet.Name = newSheetName;
|
|
|
- Debug.Log($"修改Sheet名\"{oldSheetName}\"为\"{newSheetName}\"");
|
|
|
+ UnityEngine.Debug.Log($"修改Sheet名\"{oldSheetName}\"为\"{newSheetName}\"");
|
|
|
return true;
|
|
|
}
|
|
|
catch (System.ArgumentException)
|
|
|
{
|
|
|
- Debug.LogError($"Sheet名重复请重试");
|
|
|
+ UnityEngine.Debug.LogError($"Sheet名重复请重试");
|
|
|
return false;
|
|
|
}
|
|
|
catch (System.Exception e)
|
|
|
{
|
|
|
- Debug.Log(e.GetType());
|
|
|
- Debug.LogException(e);
|
|
|
+ UnityEngine.Debug.Log(e.GetType());
|
|
|
+ UnityEngine.Debug.LogException(e);
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
@@ -78,12 +78,12 @@ public class ExcelEditor
|
|
|
}
|
|
|
catch (System.InvalidOperationException e)
|
|
|
{
|
|
|
- Debug.LogError($"请关闭Excel后重试");
|
|
|
+ UnityEngine.Debug.LogError($"请关闭Excel后重试");
|
|
|
return false;
|
|
|
}
|
|
|
catch (System.Exception e)
|
|
|
{
|
|
|
- Debug.LogException(e);
|
|
|
+ UnityEngine.Debug.LogException(e);
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
@@ -99,13 +99,13 @@ public class ExcelEditor
|
|
|
}
|
|
|
catch (System.InvalidOperationException e)
|
|
|
{
|
|
|
- Debug.LogError($"请关闭Excel后重试");
|
|
|
- Debug.LogException(e);
|
|
|
+ UnityEngine.Debug.LogError($"请关闭Excel后重试");
|
|
|
+ UnityEngine.Debug.LogException(e);
|
|
|
return false;
|
|
|
}
|
|
|
catch (System.Exception e)
|
|
|
{
|
|
|
- Debug.LogException(e);
|
|
|
+ UnityEngine.Debug.LogException(e);
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
@@ -124,12 +124,12 @@ public class ExcelEditor
|
|
|
}
|
|
|
catch (System.InvalidOperationException e)
|
|
|
{
|
|
|
- Debug.LogError($"请关闭Excel后重试");
|
|
|
+ UnityEngine.Debug.LogError($"请关闭Excel后重试");
|
|
|
return false;
|
|
|
}
|
|
|
catch (System.Exception e)
|
|
|
{
|
|
|
- Debug.LogException(e);
|
|
|
+ UnityEngine.Debug.LogException(e);
|
|
|
return false;
|
|
|
}
|
|
|
}
|