名前付き範囲式でのドイツ語ロケールのサポート
Contents
[
Hide
]
英語の数式は、名前付きの領域に書き込まれます。この Excel ファイルは、システムがドイツ語ロケールに設定されている環境で開くことができますが、英語の式はドイツ語に翻訳されます。次の例はこの機能を示していますが、Excel をドイツ語でインストールする必要があり、システム ロケールもドイツ語に設定する必要があります。
この機能をテストするためのサンプル ファイルは、次のリンクからダウンロードできます。
This file contains hidden or 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"); |