I need to generate a MS Excel 2007+ file from my application according to a given pattern provided by management. Most of the work is done, but I have to set the column width to 11,34 centimeters. I tried to use the setColumnWidth(int columnIndex, int width) method, but regardless of the value I provide it does not work. JavaDoc says:
Set the width (in units of 1/256th of a character width)
The maximum column width for an individual cell is 255 characters. This value represents the number of characters that can be displayed in a cell that is formatted with the standard font.
How to do this?
Actually, I was mistaken from the very beggining! My (terrible!) bad! Width columns were already being set, but thought not! All it took as a simple “rule of three” and I was set.