Cut

Cut([destination])

Cuts the range and save it to the clipboard or paste it to the specified range.

Parameters:

Name Type Default Description
destination ApiRange null

Specifies the new range to which the cut range will be pasted. If this argument is omitted, the range will be copied to the clipboard.

Returns:

This method doesn't return any data.

Example

Copy code
builder.CreateFile("xlsx");
var oWorksheet = Api.GetActiveSheet();
var oRange = oWorksheet.GetRange("A1");
oRange.SetValue("This is a sample text which is cut from the A1 cell and pasted to the A2 cell.");
oRange.Cut(oWorksheet.GetRange("A2"));
builder.SaveFile("xlsx", "Cut.xlsx");
builder.CloseFile();

Resulting document