名前付き範囲式でのドイツ語ロケールのサポート

Contents
[ ]

英語の数式は、名前付きの領域に書き込まれます。この Excel ファイルは、システムがドイツ語ロケールに設定されている環境で開くことができますが、英語の式はドイツ語に翻訳されます。次の例はこの機能を示していますが、Excel をドイツ語でインストールする必要があり、システム ロケールもドイツ語に設定する必要があります。

この機能をテストするためのサンプル ファイルは、次のリンクからダウンロードできます。

sampleNamedRangeTest.xlsm

// 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");