Copy a cell in a sheet (in the same or in other).
1 excel.Sheet.copyCell
<excel.Sheet.copyCell
row='row'
col='col'
>
<wb /> +
<cl /> +
<wb /> +
<sh /> +
</excel.Sheet.copyCell>
Attributes | |||||
---|---|---|---|---|---|
Name | Type | Required | Default | Description | |
Arow | integer | Number of rows which you want to copy. | |||
Acol | integer | Number of columns which you want to copy. |
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Ewb | Workbook | Initial document where is located the cell to copy. | |||
Ecl | cell | Cell to copy. | |||
Ewb | Workbook | Document where you want to copy the cell, can be the same or another. | |||
Esh | Sheet | Sheet where you want to copy the cell. |
Remarks
If you want to copy the cell in the same document, you should place the same Workbook in the root (Workbook_src) and in the destination (Workbook_dst).
Example
Copy
<xsql-script> <body> <set name='wb'> <excel.Workbook /> </set> <set name="sheet_1"> <excel.Workbook.createSheet name="Sheet 1"> <wb/> </excel.Workbook.createSheet> </set> <set name="sheet_2"> <excel.Workbook.createSheet name="Sheet 2"> <wb/> </excel.Workbook.createSheet> </set> <set name="cell_1"> <excel.Sheet.createCell row="5" col="2"> <sheet_1/> </excel.Sheet.createCell> </set> <excel.Cell.setCellValue> <cell_1/> <string>TEST TEXT</string> </excel.Cell.setCellValue> <!-- Copy the cell of the sheet 1 to the sheet 2 --> <excel.Sheet.copyCell col="1" row="1"> <wb/> <cell_1/> <wb/> <sheet_2/> </excel.Sheet.copyCell> <excel.Workbook.write> <wb/> <file name="test.xls" type="absolute"/> </excel.Workbook.write> </body> </xsql-script>