Node.js ile Birlik Aralığı Oluşturma (C++ ile)

Birleşik Aralık Oluştur

Aspose.Cells, WorksheetCollection.createUnionRange metodunu kullanarak Birlik Aralığı oluşturma özelliği sağlar. WorksheetCollection.createUnionRange metodu iki parametre alır, birincisi, birleşim aralığını oluşturmak için adres, ikincisi ise çalışma sayfasının indeksidir. WorksheetCollection.createUnionRange metodu bir UnionRange nesnesi döner.

Aşağıdaki kod örneği, WorksheetCollection.createUnionRange metodunu kullanarak Birlik Aralığı oluşturmayı gösterir. Kod tarafından oluşturulan çıktı dosyası referans için eklenmiştir.

const AsposeCells = require("aspose.cells.node");
const path = require("path");

// The path to the documents directory.
const dataDir = path.join(__dirname, "data");
const filePath = path.join(dataDir, "sample.xlsx");
// Loads the workbook which contains hidden external links
const workbook = new AsposeCells.Workbook(filePath);

// Create union range
const unionRange = workbook.getWorksheets().createUnionRange("sheet1!A1:A10,sheet1!C1:C10", 0);

// Put value "ABCD" in the range
unionRange.setValue("ABCD");

// Save the output workbook.
workbook.save("CreateUnionRange_out.xlsx");