Skip to content

Commit 255fc76

Browse files
committed
+ Functions
1 parent 76f0ee8 commit 255fc76

File tree

5 files changed

+17
-3
lines changed

5 files changed

+17
-3
lines changed

Chsword.Excel2Object.Tests/BaseExcelTest.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ protected string GetFilePath(string file)
99
{
1010
return Path.Combine(Environment.CurrentDirectory, file);
1111
}
12-
1312
protected string GetLocalFilePath(string file)
1413
{
1514
return Path.Combine(Environment.CurrentDirectory, "ExcelDir", file);

Chsword.Excel2Object/ExcelHelper.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ public static byte[] AppendObjectToExcelBytes<TModel>(byte[] sourceExcelBytes, I
1010
string sheetTitle)
1111
{
1212
var excelExporter = new ExcelExporter();
13+
1314
return excelExporter.AppendObjectToExcelBytes(sourceExcelBytes, data, sheetTitle);
1415
}
1516

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
namespace Chsword.Excel2Object.Functions
1+
 namespace Chsword.Excel2Object.Functions
22
{
33
public interface IConditionFunction
44
{
55
ColumnValue If(ColumnValue condition, ColumnValue value1, ColumnValue value2);
6+
67
}
78
}

Chsword.Excel2Object/Functions/IDateTimeFunction.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,18 @@ public interface IDateTimeFunction
55
ColumnValue Date(ColumnValue year, ColumnValue month, ColumnValue day);
66
ColumnValue DateDif(ColumnValue start, ColumnValue end, string unit);
77
ColumnValue Days(ColumnValue start, ColumnValue end);
8+
ColumnValue DateValue(ColumnValue date);
9+
ColumnValue Now();
10+
ColumnValue Time(ColumnValue hour, ColumnValue minute, ColumnValue second);
11+
ColumnValue TimeValue(ColumnValue time);
12+
ColumnValue Today();
13+
ColumnValue Weekday(ColumnValue date, ColumnValue firstDay);
14+
ColumnValue Year(ColumnValue date);
15+
ColumnValue YearFrac(ColumnValue start, ColumnValue end, string unit);
16+
ColumnValue Hour(ColumnValue time);
17+
ColumnValue Minute(ColumnValue time);
18+
ColumnValue Second(ColumnValue time);
19+
ColumnValue Month(ColumnValue date);
20+
ColumnValue Day(ColumnValue date);
821
}
922
}

Chsword.Excel2Object/Functions/ITextFunction.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
public interface ITextFunction
44
{
5-
ColumnValue Asc(string str);
5+
ColumnValue Asc(ColumnValue str);
66
ColumnValue Find(ColumnValue findText, ColumnValue withinText, int startNum);
77
ColumnValue Find(ColumnValue findText, ColumnValue withinText);
88
}

0 commit comments

Comments
 (0)