EPPlus - ExcelNamedRange - 是否有类似 RefersTo 的功能
EPPlus - ExcelNamedRange - Is there a function like RefersTo
在原来的 Excel 对象中我有 属性 RefersTo like:
workbook.Names("TestRange").RefersTo
EPPlus 中是否有等效项?
更新
这是 Excel 对话框和我要写入的字段的屏幕截图。要在 Excel 中打开此对话框,请转到:Formulars - Names-Manager
是您要搜索的吗?
sheet.Names["RangeName"].Start.Column
sheet.Names["RangeName"].End.Column
sheet.Names["RangeName"].Start.Row
sheet.Names["RangeName"].End.Row
编辑
RefetsTo 是命名范围的 range/address。
添加命名范围:
ExcelRange range = ws.Cells["A1:E5"]; // this is the RefersTo
ws.Names.Add("test", range);
编辑命名范围:
ExcelRange newrange = ws.Cells["A1:F6"]; // this is the RefersTo
ws.Names["test"].Address = newrange.Address;
编辑
要添加命名范围,请使用公式:
ws.Names.AddFormula("test2", "MAX(8,10,6,4,2)");
在原来的 Excel 对象中我有 属性 RefersTo like:
workbook.Names("TestRange").RefersTo
EPPlus 中是否有等效项?
更新
这是 Excel 对话框和我要写入的字段的屏幕截图。要在 Excel 中打开此对话框,请转到:Formulars - Names-Manager
是您要搜索的吗?
sheet.Names["RangeName"].Start.Column
sheet.Names["RangeName"].End.Column
sheet.Names["RangeName"].Start.Row
sheet.Names["RangeName"].End.Row
编辑
RefetsTo 是命名范围的 range/address。
添加命名范围:
ExcelRange range = ws.Cells["A1:E5"]; // this is the RefersTo
ws.Names.Add("test", range);
编辑命名范围:
ExcelRange newrange = ws.Cells["A1:F6"]; // this is the RefersTo
ws.Names["test"].Address = newrange.Address;
编辑
要添加命名范围,请使用公式:
ws.Names.AddFormula("test2", "MAX(8,10,6,4,2)");