fix error
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -64,6 +64,7 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="avatarguideTest.cs" />
|
||||
<Compile Include="ConsoleHelper.cs" />
|
||||
<Compile Include="CsvHelper.cs" />
|
||||
<Compile Include="ExcelHelper.cs" />
|
||||
|
||||
@@ -11,12 +11,14 @@ namespace ExcelTool
|
||||
private List<TableExcelHeader> headers = new List<TableExcelHeader>();
|
||||
private List<TableExcelRow> rows = new List<TableExcelRow>();
|
||||
public int CollonCount = 0;
|
||||
public int RowCounts = 0;
|
||||
|
||||
public TableExcelData(IEnumerable<TableExcelHeader> headers, IEnumerable<TableExcelRow> rows)
|
||||
{
|
||||
this.headers = headers.ToList();
|
||||
this.rows = rows.ToList();
|
||||
this.CollonCount = this.headers.Count;
|
||||
this.RowCounts = this.rows.Count;
|
||||
}
|
||||
|
||||
public List<TableExcelHeader> Headers
|
||||
@@ -32,7 +34,7 @@ namespace ExcelTool
|
||||
//TODO:待检查数据类型的合法性
|
||||
//public bool CheckUnique(out string errorMsg)
|
||||
//{
|
||||
|
||||
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace ExcelTool
|
||||
//先写入行数,然后每一行的数据一次写入 小写类型、字符串
|
||||
List<Tuple<string, string>> datas = new List<Tuple<string, string>>();
|
||||
var tableData = ExcelHelper.ExcelDatas(fileName);
|
||||
Tuple<string, string> rowCount = new Tuple<string, string>("int", tableData.CollonCount.ToString());
|
||||
Tuple<string, string> rowCount = new Tuple<string, string>("int", tableData.RowCounts.ToString());
|
||||
datas.Add(rowCount);
|
||||
foreach (var row in tableData.Rows)
|
||||
{
|
||||
|
||||
@@ -80,8 +80,21 @@ namespace ExcelTool
|
||||
{
|
||||
File.Delete(genExcels[i]);
|
||||
}
|
||||
|
||||
//读取测试
|
||||
//IBinarySerializable newavList = new avatarguideTestConfig();
|
||||
//var readOK = FileManager.ReadBinaryDataFromFile(Path.Combine(path, "avatarguideTest.bytes"), ref newavList);
|
||||
//if (readOK)
|
||||
//{
|
||||
// ConsoleHelper.WriteInfoLine(newavList.ToString());
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// ConsoleHelper.WriteErrorLine("读取失败");
|
||||
//}
|
||||
Console.Read();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user