Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Aspose.Cells for Node.js via C++ provides you with the ability to cut and paste cells within a worksheet by using the InsertCutCells method of the Cells collection. The InsertCutCells accepts the following parameters.
The following example shows how to cut and paste cells within a worksheet.
const path = require("path");
const AsposeCells = require("aspose.cells.node");
// Source directory
const outDir = path.join(__dirname, "output");
const workbook = new AsposeCells.Workbook();
const worksheet = workbook.getWorksheets().get(0);
worksheet.getCells().get(0, 2).setValue(1);
worksheet.getCells().get(1, 2).setValue(2);
worksheet.getCells().get(2, 2).setValue(3);
worksheet.getCells().get(2, 3).setValue(4);
worksheet.getCells().createRange(0, 2, 3, 1).setName("NamedRange");
const cut = worksheet.getCells().createRange("C:C");
worksheet.getCells().insertCutCells(cut, 0, 1, AsposeCells.ShiftType.Right);
workbook.save(path.join(outDir, "CutAndPasteCells.xlsx"));
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.