导表修改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
09d7a34c97
commit
98947b0609
|
@ -165,7 +165,7 @@ public static class ExcelExportHelper
|
||||||
}
|
}
|
||||||
|
|
||||||
//中文替换项目术语
|
//中文替换项目术语
|
||||||
if (isEn_US == false && data.TrialObjectNameList.Count > 0)
|
if (data.TrialObjectNameList.Count > 0)
|
||||||
{
|
{
|
||||||
var replaceObjectList = data.TrialObjectNameList;
|
var replaceObjectList = data.TrialObjectNameList;
|
||||||
|
|
||||||
|
@ -176,24 +176,30 @@ public static class ExcelExportHelper
|
||||||
for (int rowIndex = 0; rowIndex < rowCount; rowIndex++)
|
for (int rowIndex = 0; rowIndex < rowCount; rowIndex++)
|
||||||
{
|
{
|
||||||
var row = sheet.GetRow(rowIndex);
|
var row = sheet.GetRow(rowIndex);
|
||||||
var colums = row.LastCellNum;
|
|
||||||
|
|
||||||
for (int colIndex = 0; colIndex < colums; colIndex++)
|
if (row != null)
|
||||||
{
|
{
|
||||||
var cell = row.GetCell(colIndex);
|
|
||||||
|
|
||||||
// 只处理字符串类型的单元格
|
var colums = row.LastCellNum;
|
||||||
if (cell != null)
|
|
||||||
|
for (int colIndex = 0; colIndex < colums; colIndex++)
|
||||||
{
|
{
|
||||||
var cellValue = cell.StringCellValue;
|
var cell = row.GetCell(colIndex);
|
||||||
|
|
||||||
var find = replaceObjectList.FirstOrDefault(t => t.Name == cellValue);
|
// 只处理字符串类型的单元格
|
||||||
if (find != null)
|
if (cell != null)
|
||||||
{
|
{
|
||||||
cell.SetCellValue(find.TrialName);
|
var cellValue = cell.StringCellValue;
|
||||||
|
|
||||||
|
var find = replaceObjectList.FirstOrDefault(t => t.Name == cellValue);
|
||||||
|
if (find != null)
|
||||||
|
{
|
||||||
|
cell.SetCellValue(find.TrialName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -415,7 +421,7 @@ public static class ExcelExportHelper
|
||||||
}
|
}
|
||||||
|
|
||||||
//中文替换项目术语
|
//中文替换项目术语
|
||||||
if (isEn_US == false && data.TrialObjectNameList.Count > 0)
|
if (data.TrialObjectNameList.Count > 0)
|
||||||
{
|
{
|
||||||
var replaceObjectList = data.TrialObjectNameList;
|
var replaceObjectList = data.TrialObjectNameList;
|
||||||
|
|
||||||
|
@ -426,21 +432,25 @@ public static class ExcelExportHelper
|
||||||
for (int rowIndex = 0; rowIndex < rowCount; rowIndex++)
|
for (int rowIndex = 0; rowIndex < rowCount; rowIndex++)
|
||||||
{
|
{
|
||||||
var row = sheet.GetRow(rowIndex);
|
var row = sheet.GetRow(rowIndex);
|
||||||
var colums = row.LastCellNum;
|
if (row != null)
|
||||||
|
|
||||||
for (int colIndex = 0; colIndex < colums; colIndex++)
|
|
||||||
{
|
{
|
||||||
var cell = row.GetCell(colIndex);
|
|
||||||
|
|
||||||
// 只处理字符串类型的单元格
|
var colums = row.LastCellNum;
|
||||||
if (cell != null)
|
|
||||||
|
for (int colIndex = 0; colIndex < colums; colIndex++)
|
||||||
{
|
{
|
||||||
var cellValue = cell.StringCellValue;
|
var cell = row.GetCell(colIndex);
|
||||||
|
|
||||||
var find = replaceObjectList.FirstOrDefault(t => t.Name == cellValue);
|
// 只处理字符串类型的单元格
|
||||||
if (find != null)
|
if (cell != null)
|
||||||
{
|
{
|
||||||
cell.SetCellValue(find.TrialName);
|
var cellValue = cell.StringCellValue;
|
||||||
|
|
||||||
|
var find = replaceObjectList.FirstOrDefault(t => t.Name == cellValue);
|
||||||
|
if (find != null)
|
||||||
|
{
|
||||||
|
cell.SetCellValue(find.TrialName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue