Sposta l'intervallo di Cells in un foglio di lavoro
Contents
[
Hide
]
Questo articolo mostra come spostare un intervallo di celle in un foglio di lavoro.
Sposta l’intervallo di Cells in un foglio di lavoro
Il codice di esempio usa un file modello per dimostrare l’attività.
Il file di input
Si prega di vedere il seguente file generato con l’intervallo A1: B5 spostato in C1: D5.
Il file di output
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Instantiate the workbook object. Open the Excel file | |
Workbook workbook = new Workbook("book1.xlsx"); | |
Cells cells = workbook.Worksheets[0].Cells; | |
Range range = cells.CreateRange("A1", "B5"); | |
//move the range to right. | |
range.MoveTo(0, 2); |