Hi everyone,
I'm creating a report that outputs an Excel file and I would like to automatically change the size of the rows/columns, the Police , characters size , etc..
What are the main functions in order to do that ?
Thank you
Dear Jordan,
To my knowledge, there is no possibility in ARIS scripting to make an Excel output "automatically adjustable".
You have to specify the width of the columns, the height of the rows, the size of the font, ...
Here are the main functionalities to do so :
- Specify the width of a column : sheet.setColumnWidth(colIndex, colWidth) or sheet.setDefaultColumnWidth(colWidth)
- Specify the height of a row : row.setHeight(rowHeight) or sheet.setDefaultRowHeight(rowHeight)
- Define a font : workbook.createFont() and then specify the specifics of the font (font.setColor(Constants.C_RED) or font.setItalic(true) )
- Specify a style : workbook.createCellStyle(...)
The wrap text option will allow to have automatic "returns to the next line" if the content of the cell is bigger than the current size => it will adjust the height of the cell dynamically.
Please find attached a small example...
Does it answer your question ?
Best Regards,
François
Hi François ,
First of all , thank you for your quick and detailed answer.
Indeed, when I said "automatically", I meant how to specify police size, cell size , etc.. sorry for the misphrase, but you got my point, so thank you for your help !
All the best,
Jordan