支持在命名范围公式中使用德国区域设置
Contents
[
Hide
]
英文公式写入命名区域。此Excel文件可以在系统配置为德国区域设置的环境中打开,然而,英文公式将被翻译成德语。以下示例演示了该功能,但需要在德语中安装Excel,并且系统区域设置也要设置为德语。
可从以下链接下载用于测试此功能的示例文件:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
const string name = "HasFormula"; | |
const string value = "=GET.CELL(48, INDIRECT(\"ZS\",FALSE))"; | |
Workbook wbSource = new Workbook(sourceDir + "sampleNamedRangeTest.xlsm"); | |
WorksheetCollection wsCol = wbSource.Worksheets; | |
int nameIndex = wsCol.Names.Add(name); | |
Name namedRange = wsCol.Names[nameIndex]; | |
namedRange.RefersTo = value; | |
wbSource.Save(outputDir + "sampleOutputNamedRangeTest.xlsm"); |