Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Aspose.Cells.GridWeb component offers the means to copy rows and columns while using the GridCells class. This article demonstrates the usage of APIs exposed by Aspose.Cells.GridWeb to copy rows and columns in the GridWeb interface.
The GridCells.CopyRow, GridCells.CopyColumn, GridCells.CopyRows & GridCells.CopyColumns methods will copy the contents, styling, and formulas from the source row or column to the destination.
If you are not already acquainted with Aspose.Cells.GridWeb component, we strongly suggest that you check the Introduction to Aspose.Cells.GridWeb and the detailed article on How to add Aspose.Cells.GridWeb component in a WebForms application.
In order to keep the example simple, the article uses an existing spreadsheet with one row and a simple formula that sums all the values in the row. Here is how the spreadsheet is displayed in the Aspose.Cells.GridWeb interface before copying the row.

The code snippet is simple, as demonstrated below. It accesses the GridCells object of the active worksheet in order to copy the first row to the subsequent row.
Here is how the Aspose.Cells.GridWeb looks after the copy‑row operation.

The following example uses an existing spreadsheet with one column and a simple formula that sums all the values in the column. Here is how the spreadsheet is displayed in the Aspose.Cells.GridWeb interface before copying the column.

Similar to the above example, the following code snippet accesses the GridCells object of the active worksheet in order to copy the first column to the subsequent column.
Here is how the Aspose.Cells.GridWeb looks after the copy‑column operation.

It is also possible to copy multiple rows to a new destination while using the GridCells.CopyRows method, which takes an additional parameter of type integer to specify the number of source rows to be copied.
Here is how Aspose.Cells.GridWeb looks before & after the copy‑rows operation.


The GridCells class also provides the CopyColumns method, which takes an additional parameter of type integer to specify the number of source columns to be copied.
Here is how Aspose.Cells.GridWeb looks before & after the copy‑columns operation.


Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.