Skip to content

Commit

Permalink
[new] 支持启用宏的excel格式,即xlsm格式。
Browse files Browse the repository at this point in the history
  • Loading branch information
pirunxi committed Apr 11, 2022
1 parent d9a2e0f commit 861f40c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Luban.Common/Source/Utils/FileUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ public static bool IsExcelFile(string fullName)
{
return fullName.EndsWith(".csv", StringComparison.Ordinal)
|| fullName.EndsWith(".xls", StringComparison.Ordinal)
|| fullName.EndsWith(".xlsx", StringComparison.Ordinal);
|| fullName.EndsWith(".xlsx", StringComparison.Ordinal)
|| fullName.EndsWith(".xlsm", StringComparison.Ordinal);
}

public static (string, string) SplitFileAndSheetName(string url)
Expand Down
3 changes: 2 additions & 1 deletion src/Luban.Job.Cfg/Source/DataSources/DataSourceFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ public static AbstractDataSource Create(string url, string sheetName, Stream str
{
case "csv":
case "xls":
case "xlsx": source = new Excel.ExcelDataSource(); break;
case "xlsx":
case "xlsm": source = new Excel.ExcelDataSource(); break;
case "xml": source = new Xml.XmlDataSource(); break;
case "lua": source = new Lua.LuaDataSource(); break;
case "json": source = new Json.JsonDataSource(); break;
Expand Down

0 comments on commit 861f40c

Please sign in to comment.