Adjust the width of column to adjust the content.
1 excel.Sheet.autoSizeColumn
<excel.Sheet.autoSizeColumn col='col'>
<sh /> +
</excel.Sheet.autoSizeColumn>
Attributes | |||||
---|---|---|---|---|---|
Name | Type | Required | Default | Description | |
Acol | integer | Number of columns you want to modify. |
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Esh | Sheet | The sheet where is located the column to modify. |
Example
Returns the indicated row of the excel sheet.
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="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> <excel.Sheet.autoSizeColumn col="2"> <sheet_1/> </excel.Sheet.autoSizeColumn> <excel.Workbook.write> <wb/> <file name="test.xls" type="absolute"/> </excel.Workbook.write> </body> </xsql-script>