名前付き範囲式におけるドイツ語ロケールのサポート
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-Java | |
// Define variables | |
String name = "HasFormula"; | |
String value = "=GET.CELL(48, INDIRECT(\"ZS\",FALSE))"; | |
// Load the template file | |
Workbook wbSource = new Workbook(srcDir + "sampleNamedRangeTest.xlsm"); | |
// Get the worksheets collection | |
WorksheetCollection wsCol = wbSource.getWorksheets(); | |
// Add new name to the names collection | |
int nameIndex = wsCol.getNames().add(name); | |
// Set value to the named range | |
Name namedRange = wsCol.getNames().get(nameIndex); | |
namedRange.setRefersTo(value); | |
// Save the output file | |
wbSource.save(outDir + "sampleOutputNamedRangeTest.xlsm"); |