模板样式 空行取/
This commit is contained in:
@@ -84,8 +84,7 @@ namespace TempTask.WebEntry.Tools
|
||||
int current_skip_count = 0;
|
||||
for (int i = 0; i < sheet_item.null_row_count; i++)
|
||||
{
|
||||
if (i >= datas.Count + (sheet_item.skip_rows?.Count ?? 0))
|
||||
break;
|
||||
|
||||
var c_rowindex = startRowIndex + i;
|
||||
if (sheet_item.skip_rows != null && sheet_item.skip_rows.Contains(c_rowindex + 1))
|
||||
{
|
||||
@@ -94,6 +93,12 @@ namespace TempTask.WebEntry.Tools
|
||||
}
|
||||
int cell_start_index = sheet_item.start_cell.ToExcelColumnIndex();
|
||||
for (int x = cell_start_index; x < cell_start_index + sheet_item.null_cell_count; x++)
|
||||
{
|
||||
if (i >= datas.Count + (sheet_item.skip_rows?.Count ?? 0))
|
||||
{
|
||||
sheet.GetRow(c_rowindex).GetCell(x).SetCellValue("/");
|
||||
}
|
||||
else
|
||||
{
|
||||
var column_letter = App.Configuration[$"column_name_match_{excelTypeInt}_{sheet_item.sheet_no}:{ x.ToExcelColumnName()}"];
|
||||
if (string.IsNullOrWhiteSpace(column_letter))
|
||||
@@ -106,6 +111,7 @@ namespace TempTask.WebEntry.Tools
|
||||
cellvalue = jtoken.ToString();
|
||||
sheet.GetRow(c_rowindex).GetCell(x).SetCellValue(cellvalue);
|
||||
}
|
||||
}
|
||||
//var x = 0;
|
||||
//foreach (var cell in cells)
|
||||
//{
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user