增加载具导入功能

This commit is contained in:
FanLian
2023-08-08 09:15:17 +08:00
parent 744d053801
commit fabf6a2f4e
4 changed files with 23 additions and 67 deletions

View File

@@ -124,7 +124,7 @@ namespace Tnb.WarehouseMgr
ICellStyle style = workbook.CreateCellStyle();
IFont font = workbook.CreateFont();
font.Color = IndexedColors.Red.Index; // 将字体颜色设置为红色
font.Color = IndexedColors.Black.Index; // 将字体颜色设置为红色
style.SetFont(font);
var nameRow = sheet?.GetRow(0);
if (nameRow != null)
@@ -132,6 +132,10 @@ namespace Tnb.WarehouseMgr
Dictionary<string, object> dic = new Dictionary<string, object>();
List<string> columns = new List<string>();
columns = nameRow.Cells.Select(x => x.StringCellValue).ToList();
columns.ForEach(x => {
var strings =x.Split(new char[2] { '(', ')' });
x = strings[1];
});
if (columns?.Count > 0)
{
for (rowIndex = 1; rowIndex <= sheet?.LastRowNum; rowIndex++)