Establish a print area referenced by the index.
1 excel.Workbook.setPrintArea
<excel.Workbook.setPrintArea
index='index'
reference='reference'
start-column='start-column'
end-column='end-column'
start-row='start-row'
end-row='end-row'
>
<wb /> +
</excel.Workbook.setPrintArea>
Attributes | |||||
---|---|---|---|---|---|
Name | Type | Required | Default | Description | |
Aindex | integer | Index of the worksheet which you want to establish the printing area. | |||
Areference | string | Cells in reference format. For example $A$100:$Z4100. | |||
Astart-column | integer | Column where the print area starts. | |||
Aend-column | integer | Column where the print area ends. | |||
Astart-row | integer | Row where the print area starts. | |||
Aend-row | integer | Row where the print area ends. |
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Ewb | Workbook | Workbook. |
Example
Establish as print area from the cell A1 to Z99.
Copy
<xsql-script> <body> <set name="sheet_1"> <excel.Workbook.createSheet name="Sheet 1"> <wb/> </excel.Workbook.createSheet> </set> <set name="cell_r2c5"> <excel.Sheet.createCell row="5" col="5"> <sheet_1/> </excel.Sheet.createCell> </set> <excel.Workbook.setPrintArea index='0' reference='$A$0:$Z$99'> <wb /> </excel.Workbook.setPrintArea> <excel.Cell.setCellValue> <cell_r2c5/> <string>ROW 5X5 TEST</string> </excel.Cell.setCellValue> <excel.Workbook.write> <wb/> <file name="test.xls" type="absolute"/> </excel.Workbook.write> </body> </xsql-script>