Deplace the set of rows indicating a certain number of rows.
1 excel.Sheet.shiftRows
<excel.Sheet.shiftRows
start='start'
end='end'
num='num'
>
<sheet /> +
</excel.Sheet.shiftRows>
Attributes | |||||
---|---|---|---|---|---|
Name | Type | Required | Default | Description | |
Astart | integer | First row of the set of rows to be displaced. | |||
Aend | integer | Last row of the set of rows to be displaced. | |||
Anum | integer | Number of rows to displace. |
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Esheet | Sheet | Worksheet on which you want to apply the displacement. |
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> <!-- Load content for test in 3 columns x 5 rows --> <!-- Travel columns --> <for name='col' start='0' end='3'> <do> <!-- For each column travel the rows --> <for name='row' start='0' end='5'> <do> <set name="cell_rc"> <excel.Sheet.createCell row="#row" col="#col"> <sheet_1/> </excel.Sheet.createCell> </set> <excel.Cell.setCellValue> <cell_rc/> <string><add><excel.Cell.getCellReference row='#row' col='#col' /> col:[<col/>] row:[<row/>]</add></string> </excel.Cell.setCellValue> </do> </for> </do> </for> <!-- Displace the block of rows 2 to 5 from row 1 --> <excel.Sheet.shiftRows start='2' end='5' num='1'> <sheet_1 /> </excel.Sheet.shiftRows> <excel.Workbook.write> <wb/> <file name="test.xls" type="absolute"/> </excel.Workbook.write> </body> </xsql-script>