105040 Update 优化读取Excel逻辑
This commit is contained in:
parent
f65a13f180
commit
a885412c9f
|
@ -27,7 +27,11 @@ namespace Sinvo.EplanHpD.Plugin.WPFUI.Utils
|
||||||
}
|
}
|
||||||
public List<LectotypeModel> GetCableDatas()
|
public List<LectotypeModel> GetCableDatas()
|
||||||
{
|
{
|
||||||
if (dataFileStream == null) return null;
|
if (dataFileStream == null || !dataFileStream.CanRead)
|
||||||
|
{
|
||||||
|
// 未初始化或是无法读取时,重试一次
|
||||||
|
ReadDataToStream();
|
||||||
|
}
|
||||||
//var filePath = "D:\\旧电脑文件\\Desktop\\Data\\三菱伺服HK-KT线材选型BOM表_按程序格式整理后.xlsx";
|
//var filePath = "D:\\旧电脑文件\\Desktop\\Data\\三菱伺服HK-KT线材选型BOM表_按程序格式整理后.xlsx";
|
||||||
var data = MiniExcel.Query<LectotypeModel>(dataFileStream, "HK-KT").ToList();
|
var data = MiniExcel.Query<LectotypeModel>(dataFileStream, "HK-KT").ToList();
|
||||||
//MiniExcel.Query()
|
//MiniExcel.Query()
|
||||||
|
|
Loading…
Reference in New Issue