调整
This commit is contained in:
parent
3b53fa2ab0
commit
fea41db2dd
@ -291,9 +291,14 @@ namespace MineTec.ProManager.GalleryFiles
|
||||
// 待处理数据存储列表
|
||||
List<PatternExcelImportDto> ExcelData = new List<PatternExcelImportDto>();
|
||||
// 获取每行数据
|
||||
for (int row = 5; row <= RowNum; row++)
|
||||
string explainTitle = worksheet.Cells[1, 1].Value == null ? "" : worksheet.Cells[1, 1].Value.ToString();//第一行第一列,填写说明的标题
|
||||
string explainText = worksheet.Cells[1, 2].Value == null ? "" : worksheet.Cells[1, 2].Value.ToString();//填写说明的内容
|
||||
//从第2行开始,把每列标题也给赋值进去,方便导出生成数据,后续在校验和导入时,跳过第二行
|
||||
for (int row = 2; row <= RowNum; row++)
|
||||
{
|
||||
//类型必须为string类型,防止为null时转换出错,在具体校验时,再进行验证
|
||||
string msg = worksheet.Cells[row, 1].Value == null ? "" : worksheet.Cells[row, 1].Value.ToString();//提示信息
|
||||
string result_excel = worksheet.Cells[row, 2].Value == null ? "" : worksheet.Cells[row, 2].Value.ToString();//导入结果
|
||||
string index = worksheet.Cells[row, 3].Value == null ? "" : worksheet.Cells[row, 3].Value.ToString();//序号
|
||||
string importmode = worksheet.Cells[row, 4].Value == null ? "" : worksheet.Cells[row, 4].Value.ToString();//导入模式
|
||||
string filenum = worksheet.Cells[row, 5].Value == null ? "" : worksheet.Cells[row, 5].Value.ToString();//图纸编号
|
||||
@ -307,8 +312,8 @@ namespace MineTec.ProManager.GalleryFiles
|
||||
ExcelData.Add(new PatternExcelImportDto
|
||||
{
|
||||
// 获取每列数据
|
||||
msg = "",//提示信息
|
||||
result = "",//导入结果
|
||||
msg = msg,//提示信息
|
||||
result = result_excel,//导入结果
|
||||
index = index,//序号
|
||||
importmode = importmode,//导入模式
|
||||
filenum = filenum,//图纸编号
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user