增加载具导入功能
This commit is contained in:
@@ -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++)
|
||||
|
||||
Reference in New Issue
Block a user