Unisci o separa l'intervallo di Cells

Contents
[ ]

Esempio

Il seguente codice di esempio crea prima un intervallo - A1:D4 - quindi unisce le celle nell’intervallo in una singola cella utilizzando ilIntervallo.Unisci() metodo. Allo stesso modo, puoi dividere le celle creando un intervallo e chiamando il metodoIntervallo.UnMerge()metodo.

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
// Create a workbook
Workbook workbook = new Workbook();
// Access the first worksheet
Worksheet worksheet = workbook.Worksheets[0];
// Create a range
Range range = worksheet.Cells.CreateRange("A1:D4");
// Merge range into a single cell
range.Merge();
// Save the workbook
workbook.Save(dataDir+ "output.out.xlsx");