Question: ```
from xlsxwriter import Workbook
from string import ascii_lowercase
letters=ascii_lowercase
workbook = Workbook('Expenses01.xlsx')
worksheet = workbook.add_worksheet('Results')
worksheet.set_column('K:K', None, None, {'hidden': True})
worksheet.set_column('O:O', None, None, {'hidden': True})
row=0
cell_format = workbook.add_format()
cell_format.set_bold()
cell_format.set_bg_color('brown')
cell_format.set_pattern(1)
cell_format.set_font_color('red')
worksheet.write(0, letters.index('j'),'PLEASE FILL PRICES IF FULL DATA PROVIDED',cell_format)

```

How can I change the cell size so entire text is shown, I don't want to change entire column size just this "header" cell. (i.e allow text to be written in two lines in one cell)

after adding `cell_format.set_text_wrap()`

this is output
[![image](https://i.stack.imgur.com/5MdPd.png)](https://i.stack.imgur.com/5MdPd.png)

Answer: 
> 
> (i.e allow text to be written in two lines in one cell)
> 
> 
> 

This makes it seem like you want text wrapping within the cell. The `Format` class has a [`set_text_wrap()` method](https://xlsxwriter.readthedocs.io/format.html#format-set-text-wrap) that does this. Simply add the following line after your other format configuration.

```py
cell_format.set_text_wrap()

```
You have to use:
`cell_format.set_text_wrap()`

If you wish to adapter the height of the cell according to the text, you can use:
`set_align('vjustify')`

This information can be found at:
<https://xlsxwriter.readthedocs.io/format.html>